Prevent server dying on invalid client requests

This commit is contained in:
XANTRONIX Development 2020-09-22 18:12:29 -04:00 committed by XANTRONIX Industrial
parent 9709cef6dc
commit df84f68678

View file

@ -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: