Added download_entries

It currently doesn't funtion
stable
Justin Reichardt 2021-08-26 14:53:54 -05:00
parent 4789384846
commit 4c443474e5
2 changed files with 18 additions and 0 deletions

View File

@ -17,6 +17,11 @@ int main(int argc, char *argv[]){
printf("%d - preserve_static_entries failed",rc);
return rc;
}
rc = download_entries(&entries);
if (rc != 0){
printf("%d - download_entries failed",rc);
return rc;
}
return 0;
}
@ -141,3 +146,15 @@ int preserve_static_entries(){
fclose(tmpf);
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;
}

View File

@ -39,4 +39,5 @@ int openfile(FILE **file, char *mode, char *location);
int closefile(FILE **file, char *location);
short int determine_config_entry_value(char *buff);
int preserve_static_entries();
int download_entries(struct entry **entries);
#endif