add hostname to recvjob screwup message, print out messed up line
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Tue, 1 Dec 1992 05:35:45 +0000 (21:35 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Tue, 1 Dec 1992 05:35:45 +0000 (21:35 -0800)
SCCS-vsn: usr.sbin/lpr/lpd/recvjob.c 5.21

usr/src/usr.sbin/lpr/lpd/recvjob.c

index 2c6efda..3b67d31 100644 (file)
@@ -13,7 +13,7 @@ static char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)recvjob.c  5.20 (Berkeley) %G%";
+static char sccsid[] = "@(#)recvjob.c  5.21 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -178,7 +178,7 @@ readjob()
                        (void) readfile(dfname, size);
                        continue;
                }
                        (void) readfile(dfname, size);
                        continue;
                }
-               frecverr("protocol screwup");
+               frecverr("protocol screwup: %s", line);
        }
 }
 
        }
 }
 
@@ -316,6 +316,7 @@ frecverr(msg, va_alist)
         va_dcl
 #endif
 {
         va_dcl
 #endif
 {
+       extern char *fromb;
        va_list ap;
 #if __STDC__
        va_start(ap, msg);
        va_list ap;
 #if __STDC__
        va_start(ap, msg);
@@ -323,6 +324,7 @@ frecverr(msg, va_alist)
        va_start(ap);
 #endif
        rcleanup(0);
        va_start(ap);
 #endif
        rcleanup(0);
+       syslog(LOG_ERR, "%s", fromb);
        vsyslog(LOG_ERR, msg, ap);
        va_end(ap);
        putchar('\1');          /* return error code */
        vsyslog(LOG_ERR, msg, ap);
        va_end(ap);
        putchar('\1');          /* return error code */