parent
4789384846
commit
4c443474e5
17
src/rhosts.c
17
src/rhosts.c
|
|
@ -17,6 +17,11 @@ int main(int argc, char *argv[]){
|
||||||
printf("%d - preserve_static_entries failed",rc);
|
printf("%d - preserve_static_entries failed",rc);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
rc = download_entries(&entries);
|
||||||
|
if (rc != 0){
|
||||||
|
printf("%d - download_entries failed",rc);
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -141,3 +146,15 @@ int preserve_static_entries(){
|
||||||
fclose(tmpf);
|
fclose(tmpf);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This will download entries from the config
|
||||||
|
int download_entries(struct entry **entries){
|
||||||
|
printf("Downloading of entries is currently unavailable\n");
|
||||||
|
int i = (*entries)[0].entrytype;
|
||||||
|
for (;i >0 ; i--){
|
||||||
|
if ((*entries)[i].entrytype == CONTENTTYPE_DOWNLOAD){
|
||||||
|
printf("Download: %s\n",(*entries)[i].entry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,4 +39,5 @@ int openfile(FILE **file, char *mode, char *location);
|
||||||
int closefile(FILE **file, char *location);
|
int closefile(FILE **file, char *location);
|
||||||
short int determine_config_entry_value(char *buff);
|
short int determine_config_entry_value(char *buff);
|
||||||
int preserve_static_entries();
|
int preserve_static_entries();
|
||||||
|
int download_entries(struct entry **entries);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue