resolve conflicts

This commit is contained in:
itojun 2003-06-09 13:19:33 +00:00
parent 60b2a9bcce
commit edc2bcfc9f
3 changed files with 37 additions and 14 deletions

View File

@ -1,8 +1,8 @@
/* $NetBSD: ns_main.c,v 1.14 2003/06/03 07:33:36 itojun Exp $ */
/* $NetBSD: ns_main.c,v 1.15 2003/06/09 13:19:33 itojun Exp $ */
#if !defined(lint) && !defined(SABER)
static const char sccsid[] = "@(#)ns_main.c 4.55 (Berkeley) 7/1/91";
static const char rcsid[] = "Id: ns_main.c,v 8.162.6.1 2003/06/02 05:59:55 marka Exp";
static const char rcsid[] = "Id: ns_main.c,v 8.162.6.2 2003/06/08 22:08:02 marka Exp";
#endif /* not lint */
/*
@ -832,8 +832,12 @@ stream_accept(evContext lev, void *uap, int rfd,
sp->s_ifp = ifp;
INSIST(sizeof sp->s_temp >= INT16SZ);
iov = evConsIovec(sp->s_temp, INT16SZ);
INSIST_ERR(evRead(lev, rfd, &iov, 1, stream_getlen, sp, &sp->evID_r)
!= -1);
if (evRead(lev, rfd, &iov, 1, stream_getlen, sp, &sp->evID_r) == -1) {
ns_error(ns_log_default, "evRead(fd %d): %s",
rfd, strerror(errno));
sq_remove(sp);
return;
}
sp->flags |= STREAM_READ_EV;
ns_debug(ns_log_default, 1, "IP/TCP connection from %s (fd %d)",
sin_ntoa(sp->s_from), rfd);
@ -975,8 +979,12 @@ stream_write(evContext ctx, void *uap, int fd, int evmask) {
sp->flags &= ~STREAM_WRITE_EV;
sp->s_refcnt = 0;
iov = evConsIovec(sp->s_temp, INT16SZ);
INSIST_ERR(evRead(ctx, fd, &iov, 1, stream_getlen, sp, &sp->evID_r) !=
-1);
if (evRead(ctx, fd, &iov, 1, stream_getlen, sp, &sp->evID_r) == -1) {
ns_error(ns_log_default, "evRead(fd %d): %s",
fd, strerror(errno));
sq_remove(sp);
return;
}
sp->flags |= STREAM_READ_EV;
}
@ -1041,9 +1049,12 @@ stream_getlen(evContext lev, void *uap, int fd, int bytes) {
iov = evConsIovec(sp->s_buf, (sp->s_size <= sp->s_bufsize) ?
sp->s_size : sp->s_bufsize);
if (evRead(lev, sp->s_rfd, &iov, 1, stream_getmsg, sp, &sp->evID_r)
== -1)
ns_panic(ns_log_default, 1, "evRead(fd %d): %s",
== -1) {
ns_error(ns_log_default, "evRead(fd %d): %s",
sp->s_rfd, strerror(errno));
sq_remove(sp);
return;
}
sp->flags |= STREAM_READ_EV;
}
@ -2238,9 +2249,12 @@ sq_done(struct qstream *sp) {
}
iov = evConsIovec(sp->s_temp, INT16SZ);
if (evRead(ev, sp->s_rfd, &iov, 1, stream_getlen, sp, &sp->evID_r) ==
-1)
ns_panic(ns_log_default, 1, "evRead(fd %d): %s",
-1) {
ns_error(ns_log_default, "evRead(fd %d): %s",
sp->s_rfd, strerror(errno));
sq_remove(sp);
return;
}
sp->flags |= STREAM_READ_EV;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: gethostent.c,v 1.5 2003/06/03 07:33:57 itojun Exp $ */
/* $NetBSD: gethostent.c,v 1.6 2003/06/09 13:19:34 itojun Exp $ */
/*
* Copyright (c) 1996-1999 by Internet Software Consortium.
@ -18,7 +18,7 @@
*/
#if !defined(LINT) && !defined(CODECENTER)
static const char rcsid[] = "Id: gethostent.c,v 1.32.10.1 2003/06/02 07:53:31 marka Exp";
static const char rcsid[] = "Id: gethostent.c,v 1.32.10.2 2003/06/04 01:09:43 marka Exp";
#endif
/* Imports */
@ -611,6 +611,13 @@ scan_interfaces6(int *have_v4, int *have_v6) {
#endif
#ifdef __linux
#ifndef IF_NAMESIZE
# ifdef IFNAMSIZ
# define IF_NAMESIZE IFNAMSIZ
# else
# define IF_NAMESIZE 16
# endif
#endif
static void
scan_linux6(int *have_v6) {
FILE *proc = NULL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: res_debug.c,v 1.6 2003/06/03 07:34:10 itojun Exp $ */
/* $NetBSD: res_debug.c,v 1.7 2003/06/09 13:19:34 itojun Exp $ */
/*
* Copyright (c) 1985
@ -97,7 +97,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93";
static const char rcsid[] = "Id: res_debug.c,v 8.49 2003/01/30 23:32:35 marka Exp";
static const char rcsid[] = "Id: res_debug.c,v 8.49.6.1 2003/06/04 01:09:43 marka Exp";
#endif /* LIBC_SCCS and not lint */
#include "port_before.h"
@ -664,9 +664,11 @@ p_sockun(union res_sockaddr_union u, char *buf, size_t size) {
case AF_INET:
inet_ntop(AF_INET, &u.sin.sin_addr, ret, sizeof ret);
break;
#ifdef HAS_INET6_STRUCTS
case AF_INET6:
inet_ntop(AF_INET6, &u.sin6.sin6_addr, ret, sizeof ret);
break;
#endif
default:
sprintf(ret, "[af%d]", u.sin.sin_family);
break;