Prevent server dying on invalid client requests
This commit is contained in:
parent
9709cef6dc
commit
df84f68678
1 changed files with 2 additions and 5 deletions
|
@ -1159,13 +1159,11 @@ static int handle_client(uint32_t key,
|
|||
}
|
||||
|
||||
if (call <= PATTY_CLIENT_NONE || call >= PATTY_CLIENT_CALL_COUNT) {
|
||||
goto error_io;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (server_calls[call] == NULL) {
|
||||
errno = ENOSYS;
|
||||
|
||||
goto error_not_implemented;
|
||||
goto done;
|
||||
}
|
||||
|
||||
return server_calls[call](server, client);
|
||||
|
@ -1173,7 +1171,6 @@ static int handle_client(uint32_t key,
|
|||
done:
|
||||
return 0;
|
||||
|
||||
error_not_implemented:
|
||||
error_dict_delete_socks_by_client:
|
||||
error_dict_delete_clients:
|
||||
error_io:
|
||||
|
|
Loading…
Add table
Reference in a new issue