From: Frédéric Marchal Date: Fri, 17 Feb 2012 17:00:36 +0000 (+0100) Subject: Report the full downloaded url again X-Git-Tag: v2.3.3-pre1~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=24eb624ea44bf4c82c602cea2195d85558787b47;p=thirdparty%2Fsarg.git Report the full downloaded url again Due to a bug, the download report only showed the host name instead of the full url as it used to do prior to version 2.3.2. Thanks to Kryol for reporting that bug. --- diff --git a/log.c b/log.c index ed200b3..a6d6c61 100644 --- a/log.c +++ b/log.c @@ -147,7 +147,7 @@ int main(int argc,char *argv[]) unsigned long recs2=0UL; int OutputNonZero = REPORT_EVERY_X_LINES ; bool download_flag=false; - char *download_url=NULL; + char download_url[MAXLEN]; struct getwordstruct gwarea; longline line; time_t tnum; @@ -1331,7 +1331,7 @@ int main(int argc,char *argv[]) */ download_flag=is_download_suffix(full_url); if (download_flag) { - download_url=full_url; + safe_strcpy(download_url,full_url,sizeof(download_url)); download_count++; } } else @@ -1503,7 +1503,7 @@ int main(int argc,char *argv[]) totregsg++; - if(!dataonly && download_flag && download_url && strstr(code,"DENIED") == 0) { + if(!dataonly && download_flag && strstr(code,"DENIED") == 0) { ndownload = 1; if ( ! fp_Download_Unsort ) {