Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/net Set errno when res_mkquery fails.



details:   https://anonhg.NetBSD.org/src/rev/a8fecfb72f46
branches:  trunk
changeset: 488093:a8fecfb72f46
user:      ghudson <ghudson%NetBSD.org@localhost>
date:      Sun Jun 18 04:07:03 2000 +0000

description:
Set errno when res_mkquery fails.

diffstat:

 lib/libc/net/hesiod.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 749273c37a41 -r a8fecfb72f46 lib/libc/net/hesiod.c
--- a/lib/libc/net/hesiod.c     Sun Jun 18 02:25:17 2000 +0000
+++ b/lib/libc/net/hesiod.c     Sun Jun 18 04:07:03 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hesiod.c,v 1.12 2000/01/22 22:19:15 mycroft Exp $      */
+/*     $NetBSD: hesiod.c,v 1.13 2000/06/18 04:07:03 ghudson Exp $      */
 
 /* Copyright (c) 1996 by Internet Software Consortium.
  *
@@ -52,7 +52,7 @@
     "#Id: hesiod_p.h,v 1.1 1996/12/08 21:39:37 ghudson Exp #");
 __IDSTRING(rcsid_hescompat_c,
     "#Id: hescompat.c,v 1.1.2.1 1996/12/16 08:37:45 ghudson Exp #");
-__RCSID("$NetBSD: hesiod.c,v 1.12 2000/01/22 22:19:15 mycroft Exp $");
+__RCSID("$NetBSD: hesiod.c,v 1.13 2000/06/18 04:07:03 ghudson Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -413,8 +413,10 @@
                /* Construct the query. */
        n = res_mkquery(QUERY, name, qclass, T_TXT, NULL, 0,
            NULL, qbuf, PACKETSZ);
-       if (n < 0)
+       if (n < 0) {
+               errno = EMSGSIZE;
                return NULL;
+       }
 
                /* Send the query. */
        n = res_send(qbuf, n, abuf, MAX_HESRESP);



Home | Main Index | Thread Index | Old Index