]> git.ozlabs.org Git - ppp.git/blobdiff - chat/chat.c
style
[ppp.git] / chat / chat.c
index 02fa4499439911ff3d39809f966c01a0f5de15fb..14db281068a1bda87a052d979018940eeb40961e 100644 (file)
@@ -87,7 +87,7 @@
 #endif
 
 #ifndef lint
-static const char rcsid[] = "$Id: chat.c,v 1.25 1999/09/06 05:10:23 paulus Exp $";
+static const char rcsid[] = "$Id: chat.c,v 1.28 2003/02/26 10:18:10 fcusack Exp $";
 #endif
 
 #include <stdio.h>
@@ -203,7 +203,7 @@ int n_aborts = 0, abort_next = 0, timeout_next = 0, echo_next = 0;
 int clear_abort_next = 0;
 
 char *report_string[MAX_REPORTS] ;
-char  report_buffer[50] ;
+char  report_buffer[256] ;
 int n_reports = 0, report_next = 0, report_gathering = 0 ; 
 int clear_report_next = 0;
 
@@ -1092,8 +1092,8 @@ register char *s;
            fatal(2, "Too many REPORT strings");
        
        s1 = clean(s, 0);
-       
-       if (strlen(s1) > strlen(s) || strlen(s1) > sizeof fail_buffer - 1)
+       if (strlen(s1) > strlen(s)
+           || strlen(s1) + 1 > sizeof(fail_buffer))
            fatal(1, "Illegal or too-long REPORT string ('%v')", s);
        
        report_string[n_reports++] = s1;
@@ -1113,7 +1113,8 @@ register char *s;
        
        s1 = clean(s, 0);
        
-       if (strlen(s1) > strlen(s) || strlen(s1) > sizeof fail_buffer - 1)
+       if (strlen(s1) > strlen(s)
+           || strlen(s1) + 1 > sizeof(fail_buffer))
            fatal(1, "Illegal or too-long REPORT string ('%v')", s);
 
        old_max = n_reports;
@@ -1467,7 +1468,8 @@ register char *string;
 
        if (s >= end) {
            if (logged < s - minlen) {
-               logf("%0.*v", s - logged, logged);
+               if (verbose)
+                   logf("%0.*v", s - logged, logged);
                logged = s;
            }
            s -= minlen;