Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/bind/dist/lib/isc/unix The common fields of the...



details:   https://anonhg.NetBSD.org/src/rev/5aee4352f1fd
branches:  trunk
changeset: 786078:5aee4352f1fd
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Apr 14 13:18:23 2013 +0000

description:
The common fields of the socket should be initialized in one place since
we are the socket provider. Fixes crash with "rndc status", where accepted
sockets did not have their method fields initialized!

diffstat:

 external/bsd/bind/dist/lib/isc/unix/socket.c |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r 6c034dd76023 -r 5aee4352f1fd external/bsd/bind/dist/lib/isc/unix/socket.c
--- a/external/bsd/bind/dist/lib/isc/unix/socket.c      Sun Apr 14 12:46:29 2013 +0000
+++ b/external/bsd/bind/dist/lib/isc/unix/socket.c      Sun Apr 14 13:18:23 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: socket.c,v 1.10 2013/03/24 18:42:01 christos Exp $     */
+/*     $NetBSD: socket.c,v 1.11 2013/04/14 13:18:23 christos Exp $     */
 
 /*
  * Copyright (C) 2004-2012  Internet Systems Consortium, Inc. ("ISC")
@@ -2149,6 +2149,7 @@
 
        sock->common.magic = ISCAPI_SOCKET_MAGIC;
        sock->common.impmagic = SOCKET_MAGIC;
+       sock->common.methods = (isc_socketmethods_t *)&socketmethods;
        *socketp = sock;
 
        return (ISC_R_SUCCESS);
@@ -2600,7 +2601,6 @@
                return (result);
        }
 
-       sock->common.methods = (isc_socketmethods_t *)&socketmethods;
        sock->references = 1;
        *socketp = (isc_socket_t *)sock;
 
@@ -2736,7 +2736,6 @@
        sock->fdwatchtask = task;
        sock->statsindex = fdwatchstatsindex;
 
-       sock->common.methods = (isc_socketmethods_t *)&socketmethods;
        sock->references = 1;
        *socketp = (isc_socket_t *)sock;
 



Home | Main Index | Thread Index | Old Index