X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=src%2Fclient.c;h=2ad53ba983273dbee7256d925a9b210829cb7826;hb=320a5588a8f195ee982722729c2b8dc99c68756f;hp=e304f35b25fea204e5d225d7d11cd9f24982803a;hpb=ebdd6565cbbd2db46833530112c15be0e22afc29;p=umurmur.git diff --git a/src/client.c b/src/client.c index e304f35..2ad53ba 100644 --- a/src/client.c +++ b/src/client.c @@ -354,10 +354,10 @@ int Client_read_fd(int fd) break; } } - if (client == NULL) - Log_fatal("No client found for fd %d", fd); - - return Client_read(client); + if (client != NULL) + return Client_read(client); + else + return -1; } int Client_read(client_t *client) @@ -457,10 +457,10 @@ int Client_write_fd(int fd) break; } } - if (client == NULL) - Log_fatal("No client found for fd %d", fd); - Client_write(client); - return 0; + if (client != NULL) + return Client_write(client); + else + return -1; } int Client_write(client_t *client) @@ -690,7 +690,6 @@ int Client_read_udp() memcpy(&itr->remote_udp, &from, sizeof(struct sockaddr_in)); break; } - else Log_warn("Bad cryptstate from peer"); } } /* while */ }