Deleted Added
full compact
recvjob.c (68253) recvjob.c (68340)
1/*
2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 29 unchanged lines hidden (view full) ---

38 The Regents of the University of California. All rights reserved.\n";
39#endif /* not lint */
40
41#ifndef lint
42#if 0
43static char sccsid[] = "@(#)recvjob.c 8.2 (Berkeley) 4/27/95";
44#endif
45static const char rcsid[] =
1/*
2 * Copyright (c) 1983, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 29 unchanged lines hidden (view full) ---

38 The Regents of the University of California. All rights reserved.\n";
39#endif /* not lint */
40
41#ifndef lint
42#if 0
43static char sccsid[] = "@(#)recvjob.c 8.2 (Berkeley) 4/27/95";
44#endif
45static const char rcsid[] =
46 "$FreeBSD: head/usr.sbin/lpr/lpd/recvjob.c 68253 2000-11-02 19:22:06Z gad $";
46 "$FreeBSD: head/usr.sbin/lpr/lpd/recvjob.c 68340 2000-11-05 02:24:20Z gad $";
47#endif /* not lint */
48
49/*
50 * Receive printer jobs from the network, queue them and
51 * start the printer daemon.
52 */
53#include <sys/param.h>
54#include <sys/mount.h>

--- 317 unchanged lines hidden (view full) ---

372#endif
373{
374 va_list ap;
375#ifdef __STDC__
376 va_start(ap, msg);
377#else
378 va_start(ap);
379#endif
47#endif /* not lint */
48
49/*
50 * Receive printer jobs from the network, queue them and
51 * start the printer daemon.
52 */
53#include <sys/param.h>
54#include <sys/mount.h>

--- 317 unchanged lines hidden (view full) ---

372#endif
373{
374 va_list ap;
375#ifdef __STDC__
376 va_start(ap, msg);
377#else
378 va_start(ap);
379#endif
380 rcleanup(0);
381 syslog(LOG_ERR, "%s", fromb);
380 syslog(LOG_ERR, "Error receiving job from %s:", fromb);
382 vsyslog(LOG_ERR, msg, ap);
383 va_end(ap);
381 vsyslog(LOG_ERR, msg, ap);
382 va_end(ap);
383 /*
384 * rcleanup is not called until AFTER logging the error message,
385 * because rcleanup will zap some variables which may have been
386 * supplied as parameters for that msg...
387 */
388 rcleanup(0);
389 /*
390 * Add a minimal delay before returning the final error code to
391 * the sending host. This just in case that machine responds
392 * this error by INSTANTLY retrying (and instantly re-failing...).
393 * It would be stupid of the sending host to do that, but if there
394 * was a broken implementation which did it, the result might be
395 * obscure performance problems and a flood of syslog messages on
396 * the receiving host.
397 */
398 sleep(2); /* a paranoid throttling measure */
384 putchar('\1'); /* return error code */
385 exit(1);
386}
399 putchar('\1'); /* return error code */
400 exit(1);
401}