1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

r7754: fixed the local port of accepted sockets in socket_wrapper. This fixes

the problem with the ldap tests in 'make test'
(This used to be commit 56fe27623c)
This commit is contained in:
Andrew Tridgell 2005-06-19 12:34:59 +00:00 committed by Gerald (Jerry) Carter
parent b3e862b2d5
commit 683f3bc96e

View File

@ -242,11 +242,10 @@ int swrap_accept(int s, struct sockaddr *addr, socklen_t *addrlen)
memset(child_si, 0, sizeof(*child_si)); memset(child_si, 0, sizeof(*child_si));
child_si->fd = fd; child_si->fd = fd;
child_si->bound = 1;
if (addr && addrlen) { child_si->myname_len = parent_si->myname_len;
child_si->myname_len = *addrlen; child_si->myname = sockaddr_dup(parent_si->myname, parent_si->myname_len);
child_si->myname = sockaddr_dup(addr, *addrlen);
}
child_si->peername_len = *addrlen; child_si->peername_len = *addrlen;
child_si->peername = sockaddr_dup(addr, *addrlen); child_si->peername = sockaddr_dup(addr, *addrlen);