diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-06-19 12:34:59 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2005-06-19 12:34:59 +0000 |
commit | 00a57ad1273c03f6c5393aeda70c41125a30cd20 (patch) | |
tree | e4fde6b77cfa21c2f65b4e5e6e026fd379333c94 /source/lib/socket_wrapper/socket_wrapper.c | |
parent | 339428361182c4d0fc0f551d5ce515da5b3ae298 (diff) | |
download | samba-00a57ad1273c03f6c5393aeda70c41125a30cd20.tar.gz samba-00a57ad1273c03f6c5393aeda70c41125a30cd20.tar.xz samba-00a57ad1273c03f6c5393aeda70c41125a30cd20.zip |
r7754: fixed the local port of accepted sockets in socket_wrapper. This fixes
the problem with the ldap tests in 'make test'
Diffstat (limited to 'source/lib/socket_wrapper/socket_wrapper.c')
-rw-r--r-- | source/lib/socket_wrapper/socket_wrapper.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/lib/socket_wrapper/socket_wrapper.c b/source/lib/socket_wrapper/socket_wrapper.c index 882ef462eae..42bac4bfaee 100644 --- a/source/lib/socket_wrapper/socket_wrapper.c +++ b/source/lib/socket_wrapper/socket_wrapper.c @@ -242,11 +242,10 @@ int swrap_accept(int s, struct sockaddr *addr, socklen_t *addrlen) memset(child_si, 0, sizeof(*child_si)); child_si->fd = fd; + child_si->bound = 1; - if (addr && addrlen) { - child_si->myname_len = *addrlen; - child_si->myname = sockaddr_dup(addr, *addrlen); - } + child_si->myname_len = parent_si->myname_len; + child_si->myname = sockaddr_dup(parent_si->myname, parent_si->myname_len); child_si->peername_len = *addrlen; child_si->peername = sockaddr_dup(addr, *addrlen); |