]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Add missing \n on several debug messages
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Thu, 10 Nov 2011 19:59:17 +0000 (19:59 +0000)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Thu, 10 Nov 2011 19:59:17 +0000 (19:59 +0000)
Some messages were missing the carriage return. The consequence was a
concatenation of the following message with the previous one potentially
letting it go unnoticed.

exclude.c
log.c
smartfilter.c
url.c
usertab.c

index 80ff91f2fa692b7e4f68263c45a24f6da6c0e137..486655a2eb695ed1c196014f2a149eb38f5c3b76 100644 (file)
--- a/exclude.c
+++ b/exclude.c
@@ -211,7 +211,7 @@ void gethexclude(const char *hexfile, int debug)
 
                type=extract_address_mask(buf,&name,ipv4,ipv6,&nbits,&next);
                if (type<0) {
-                       debuga(_("While reading \"%s\""),hexfile);
+                       debuga(_("While reading \"%s\"\n"),hexfile);
                        exit(EXIT_FAILURE);
                }
 
diff --git a/log.c b/log.c
index 8784dc65ad12bbe4a158eb59b17c047e791837ae..aa3a73c5d0605b85e4f78bd4a5ab5ec7f9b01fc9 100644 (file)
--- a/log.c
+++ b/log.c
@@ -759,7 +759,7 @@ int main(int argc,char *argv[])
                }
 
                if(debug)
-                       debuga("Maximum file descriptor: cur=%ld max=%ld, changed to cur="RLIM_STRING" max="RLIM_STRING,l1,l2,rl.rlim_cur,rl.rlim_max);
+                       debuga("Maximum file descriptor: cur=%ld max=%ld, changed to cur="RLIM_STRING" max="RLIM_STRING"\n",l1,l2,rl.rlim_cur,rl.rlim_max);
        }
 #endif
 
@@ -879,7 +879,7 @@ int main(int argc,char *argv[])
                                        my_mkdir(ParsedOutputLog);
                                }
                                if (snprintf(arq_log,sizeof(arq_log),"%s/sarg_temp.log",ParsedOutputLog)>=sizeof(arq_log)) {
-                                       debuga(_("File name too long: %s/sarg_temp.log"),ParsedOutputLog);
+                                       debuga(_("File name too long: %s/sarg_temp.log\n"),ParsedOutputLog);
                                        exit(EXIT_FAILURE);
                                }
                                if((fp_log=MY_FOPEN(arq_log,"w"))==NULL) {
@@ -1647,7 +1647,7 @@ int main(int argc,char *argv[])
                strftime(val2,sizeof(val2),"%d%m%Y",&period.start);
                strftime(val1,sizeof(val1),"%d%m%Y",&period.end);
                if (snprintf(val4,sizeof(val4),"%s/sarg-%s_%s-%s_%s.log",ParsedOutputLog,val2,start_hour,val1,end_hour)>=sizeof(val4)) {
-                       debuga(_("File name too long: %s/sarg-%s_%s-%s_%s.log"),ParsedOutputLog,val2,start_hour,val1,end_hour);
+                       debuga(_("File name too long: %s/sarg-%s_%s-%s_%s.log\n"),ParsedOutputLog,val2,start_hour,val1,end_hour);
                        exit(EXIT_FAILURE);
                }
                if (rename(arq_log,val4)) {
@@ -1661,7 +1661,7 @@ int main(int argc,char *argv[])
                                necessary around the command name, put them in the configuration file.
                                */
                                if (snprintf(val1,sizeof(val1),"%s \"%s\"",ParsedOutputLogCompress,arq_log)>=sizeof(val1)) {
-                                       debuga(_("Command too long: %s \"%s\""),ParsedOutputLogCompress,arq_log);
+                                       debuga(_("Command too long: %s \"%s\"\n"),ParsedOutputLogCompress,arq_log);
                                        exit(EXIT_FAILURE);
                                }
                                cstatus=system(val1);
index 4538d7003178a13f746296542b2eba2bc32ff55e..5ab13da1f6d369131334457d80e7eb8e901ff753 100644 (file)
@@ -54,19 +54,19 @@ void smartfilter_report(void)
        ouser[0]='\0';
 
        if (snprintf(smart_in,sizeof(smart_in),"%s/smartfilter.unsort",outdirname)>=sizeof(smart_in)) {
-               debuga(_("File name too long: %s/smartfilter.unsort"),outdirname);
+               debuga(_("File name too long: %s/smartfilter.unsort\n"),outdirname);
                exit(EXIT_FAILURE);
        }
        if (snprintf(sites,sizeof(sites),"%s/sarg-sites",outdirname)>=sizeof(sites)) {
-               debuga(_("File name too long: %s/sarg-sites"),outdirname);
+               debuga(_("File name too long: %s/sarg-sites\n"),outdirname);
                exit(EXIT_FAILURE);
        }
        if (snprintf(smart_ou,sizeof(smart_ou),"%s/smartfilter.log",outdirname)>=sizeof(smart_ou)) {
-               debuga(_("File name too long: %s/smartfilter.log"),outdirname);
+               debuga(_("File name too long: %s/smartfilter.log\n"),outdirname);
                exit(EXIT_FAILURE);
        }
        if (snprintf(report,sizeof(report),"%s/smartfilter.html",outdirname)>=sizeof(report)) {
-               debuga(_("File name too long: %s/smartfilter.html"),outdirname);
+               debuga(_("File name too long: %s/smartfilter.html\n"),outdirname);
                exit(EXIT_FAILURE);
        }
 
diff --git a/url.c b/url.c
index 188c2252f413beb380dcfd9b7aab3e50839aa736..803274c95d00ff8e37c8f6d1fa76db867640320d 100644 (file)
--- a/url.c
+++ b/url.c
@@ -122,14 +122,14 @@ static int Alias_StoreName(const char *name,const char *next)
                NameEnd=++str;
                while (str<next && (unsigned char)*str>' ') {
                        if (*str=='*') {
-                               debuga(_("Host name alias \"%s*%s\" contains too many wildcards (*)"),NameBegin,NameEnd);
+                               debuga(_("Host name alias \"%s*%s\" contains too many wildcards (*)\n"),NameBegin,NameEnd);
                                return(-1);
                        }
                        str++;
                }
                NameEndE=str;
                if (NameEnd==NameEndE) {
-                       debuga(_("Host name alias \"%*s\" must not end with a wildcard"),(int)(next-name),name);
+                       debuga(_("Host name alias \"%*s\" must not end with a wildcard\n"),(int)(next-name),name);
                        return(-1);
                }
        } else {
@@ -156,7 +156,7 @@ static int Alias_StoreName(const char *name,const char *next)
                len=(int)(NameBeginE-NameBegin);
                tmp=malloc(len+1);
                if (!tmp) {
-                       debuga(_("Not enough memory to store the host name aliasing directives"));
+                       debuga(_("Not enough memory to store the host name aliasing directives\n"));
                        return(-1);
                }
                memcpy(tmp,NameBegin,len);
@@ -168,7 +168,7 @@ static int Alias_StoreName(const char *name,const char *next)
                tmp=malloc(len+1);
                if (!tmp) {
                        if (NameBegin) free((void*)NameBegin);
-                       debuga(_("Not enough memory to store the host name aliasing directives"));
+                       debuga(_("Not enough memory to store the host name aliasing directives\n"));
                        return(-1);
                }
                memcpy(tmp,NameEnd,len);
@@ -192,7 +192,7 @@ static int Alias_StoreName(const char *name,const char *next)
        if (!new_alias) {
                if (NameBegin) free((void*)NameBegin);
                if (NameEnd) free((void*)NameEnd);
-               debuga(_("Not enough memory to store the host name aliasing directives"));
+               debuga(_("Not enough memory to store the host name aliasing directives\n"));
                return(-1);
        }
        new_alias->MinLen=0;
@@ -216,7 +216,7 @@ static int Alias_StoreName(const char *name,const char *next)
                len=(int)(ReplaceE-Replace);
                tmp=malloc(len+2);
                if (!tmp) {
-                       debuga(_("Not enough memory to store the host name aliasing directives"));
+                       debuga(_("Not enough memory to store the host name aliasing directives\n"));
                        return(-1);
                }
                tmp[0]=ALIAS_PREFIX;
@@ -226,7 +226,7 @@ static int Alias_StoreName(const char *name,const char *next)
        } else {
                tmp=malloc(new_alias->MinLen+2);
                if (!tmp) {
-                       debuga(_("Not enough memory to store the host name aliasing directives"));
+                       debuga(_("Not enough memory to store the host name aliasing directives\n"));
                        return(-1);
                }
                tmp[0]=ALIAS_PREFIX;
@@ -292,7 +292,7 @@ static int Alias_StoreIpv4(unsigned char *ipv4,int nbits,const char *next)
        // insert into the list
        new_alias=malloc(sizeof(*new_alias));
        if (!new_alias) {
-               debuga(_("Not enough memory to store the host name aliasing directives"));
+               debuga(_("Not enough memory to store the host name aliasing directives\n"));
                return(-1);
        }
        memcpy(new_alias->Ip,ipv4,4);
@@ -301,7 +301,7 @@ static int Alias_StoreIpv4(unsigned char *ipv4,int nbits,const char *next)
                len=(int)(ReplaceE-Replace);
                tmp=malloc(len+2);
                if (!tmp) {
-                       debuga(_("Not enough memory to store the host name aliasing directives"));
+                       debuga(_("Not enough memory to store the host name aliasing directives\n"));
                        return(-1);
                }
                tmp[0]=ALIAS_PREFIX;
@@ -311,7 +311,7 @@ static int Alias_StoreIpv4(unsigned char *ipv4,int nbits,const char *next)
        } else {
                tmp=malloc(5*4+1);
                if (!tmp) {
-                       debuga(_("Not enough memory to store the host name aliasing directives"));
+                       debuga(_("Not enough memory to store the host name aliasing directives\n"));
                        return(-1);
                }
                sprintf(tmp,"%c%d.%d.%d.%d/%d",ALIAS_PREFIX,ipv4[0],ipv4[1],ipv4[2],ipv4[3],nbits);
@@ -374,7 +374,7 @@ static int Alias_StoreIpv6(unsigned short *ipv6,int nbits,const char *next)
        // insert into the list
        new_alias=malloc(sizeof(*new_alias));
        if (!new_alias) {
-               debuga(_("Not enough memory to store the host name aliasing directives"));
+               debuga(_("Not enough memory to store the host name aliasing directives\n"));
                return(-1);
        }
        memcpy(new_alias->Ip,ipv6,8*sizeof(unsigned short int));
@@ -383,7 +383,7 @@ static int Alias_StoreIpv6(unsigned short *ipv6,int nbits,const char *next)
                len=ReplaceE-Replace;
                tmp=malloc(len+2);
                if (!tmp) {
-                       debuga(_("Not enough memory to store the host name aliasing directives"));
+                       debuga(_("Not enough memory to store the host name aliasing directives\n"));
                        return(-1);
                }
                tmp[0]=ALIAS_PREFIX;
@@ -393,7 +393,7 @@ static int Alias_StoreIpv6(unsigned short *ipv6,int nbits,const char *next)
        } else {
                tmp=malloc(5*8+5);
                if (!tmp) {
-                       debuga(_("Not enough memory to store the host name aliasing directives"));
+                       debuga(_("Not enough memory to store the host name aliasing directives\n"));
                        return(-1);
                }
                sprintf(tmp,"%c%x:%x:%x:%x:%x:%x:%x:%x/%d",ALIAS_PREFIX,ipv6[0],ipv6[1],ipv6[2],ipv6[3],ipv6[4],ipv6[5],ipv6[6],ipv6[7],nbits);
@@ -442,7 +442,7 @@ void read_hostalias(const char *Filename)
        while ((buf=longline_read(fi,line)) != NULL) {
                type=extract_address_mask(buf,&name,ipv4,ipv6,&nbits,&next);
                if (type<0) {
-                       debuga(_("While reading \"%s\""),Filename);
+                       debuga(_("While reading \"%s\"\n"),Filename);
                        exit(EXIT_FAILURE);
                }
 
index 0cc83c8dfb95a26888cee39e649af9bcb5c16d5b..63e8dcdaf5930fcc62ba10d2df0c27fda9ab305d 100644 (file)
--- a/usertab.c
+++ b/usertab.c
@@ -70,7 +70,7 @@ static void init_file_usertab(const char *UserTabFile)
        }
        nreg = ftell(fp_usr);
        if (nreg<0) {
-               debuga(_("Cannot get the size of file %s"),UserTabFile);
+               debuga(_("Cannot get the size of file %s\n"),UserTabFile);
                exit(EXIT_FAILURE);
        }
        nreg += 100;
@@ -79,7 +79,7 @@ static void init_file_usertab(const char *UserTabFile)
                exit(EXIT_FAILURE);
        }
        if((userfile=(char *) malloc(nreg))==NULL){
-               debuga(_("ERROR: Cannot load. Memory fault"));
+               debuga(_("ERROR: Cannot load. Memory fault\n"));
                exit(EXIT_FAILURE);
        }
        userfile[0]='\t';