Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/lpr/lpd specify the reason when aborting with "Malf...



details:   https://anonhg.NetBSD.org/src/rev/531acf72e416
branches:  trunk
changeset: 535139:531acf72e416
user:      grant <grant%NetBSD.org@localhost>
date:      Sun Aug 11 07:04:00 2002 +0000

description:
specify the reason when aborting with "Malformed from address",
suggested by Matt Green.

diffstat:

 usr.sbin/lpr/lpd/lpd.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r ce30cb9290e8 -r 531acf72e416 usr.sbin/lpr/lpd/lpd.c
--- a/usr.sbin/lpr/lpd/lpd.c    Sun Aug 11 06:53:39 2002 +0000
+++ b/usr.sbin/lpr/lpd/lpd.c    Sun Aug 11 07:04:00 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lpd.c,v 1.36 2002/08/09 02:40:57 itojun Exp $  */
+/*     $NetBSD: lpd.c,v 1.37 2002/08/11 07:04:00 grant Exp $   */
 
 /*
  * Copyright (c) 1983, 1993, 1994
@@ -45,7 +45,7 @@
 #if 0
 static char sccsid[] = "@(#)lpd.c      8.7 (Berkeley) 5/10/95";
 #else
-__RCSID("$NetBSD: lpd.c,v 1.36 2002/08/09 02:40:57 itojun Exp $");
+__RCSID("$NetBSD: lpd.c,v 1.37 2002/08/11 07:04:00 grant Exp $");
 #endif
 #endif /* not lint */
 
@@ -636,7 +636,7 @@
        error = getnameinfo(f, f->sa_len, NULL, 0, serv, sizeof(serv),
                            NI_NUMERICSERV);
        if (error)
-               fatal("Malformed from address");
+               fatal("Malformed from address: %s", gai_strerror(error));
 
          if (!(check_opts & LPD_NOPORTCHK) &&
               atoi(serv) >= IPPORT_RESERVED)



Home | Main Index | Thread Index | Old Index