Fix socket_accept usage to depend on family.
This commit is contained in:
parent
66670c3541
commit
618ce43ee3
8 changed files with 22 additions and 13 deletions
|
@ -169,11 +169,7 @@ int socket_listen(p_socket ps, int backlog) {
|
|||
\*-------------------------------------------------------------------------*/
|
||||
int socket_accept(p_socket ps, p_socket pa, SA *addr, socklen_t *len,
|
||||
p_timeout tm) {
|
||||
SA daddr;
|
||||
socklen_t dlen = sizeof(daddr);
|
||||
if (*ps == SOCKET_INVALID) return IO_CLOSED;
|
||||
if (!addr) addr = &daddr;
|
||||
if (!len) len = &dlen;
|
||||
for ( ;; ) {
|
||||
int err;
|
||||
/* try to get client socket */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue