Make bind() not care about socket status
This commit is contained in:
parent
3657c883c7
commit
be6ff4b660
1 changed files with 0 additions and 13 deletions
13
src/server.c
13
src/server.c
|
@ -638,24 +638,11 @@ static int server_bind(patty_ax25_server *server,
|
||||||
goto error_exists;
|
goto error_exists;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (sock->status) {
|
|
||||||
case PATTY_AX25_SOCK_LISTENING:
|
|
||||||
case PATTY_AX25_SOCK_ESTABLISHED:
|
|
||||||
response.ret = -1;
|
|
||||||
response.eno = EINVAL;
|
|
||||||
|
|
||||||
goto error_invalid_status;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
memcpy(&sock->local, &request.addr, sizeof(request.addr));
|
memcpy(&sock->local, &request.addr, sizeof(request.addr));
|
||||||
|
|
||||||
response.ret = 0;
|
response.ret = 0;
|
||||||
response.eno = 0;
|
response.eno = 0;
|
||||||
|
|
||||||
error_invalid_status:
|
|
||||||
error_exists:
|
error_exists:
|
||||||
error_bound:
|
error_bound:
|
||||||
error_sock_by_fd:
|
error_sock_by_fd:
|
||||||
|
|
Loading…
Add table
Reference in a new issue