summaryrefslogtreecommitdiff
path: root/blabouncer.c
diff options
context:
space:
mode:
Diffstat (limited to 'blabouncer.c')
-rw-r--r--blabouncer.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/blabouncer.c b/blabouncer.c
index bbb22cd..567de57 100644
--- a/blabouncer.c
+++ b/blabouncer.c
@@ -544,13 +544,9 @@ void dochat(int *serversockfd, int *clientsockfd, struct settings *settings) {
debugprint(DEBUG_FULL, "reading server socket!\n");
if ((servernumbytes = sockread(server_ssl, serverbuf, MAXRCVSIZE - 1, settings->servertls)) == -1) {
- perror("recv");
- printf("receive error (-1), skipping loop iteration...\n");
- debugprint(DEBUG_CRIT, "serversockfd receive error (-1), skipping loop iteration, errno '%d'.\n");
+ debugprint(DEBUG_CRIT, "dochat(): server sockread() error (-1) (%s), skipping loop iteration.\n", strerror(errno));
} else if (servernumbytes == 0) {
- perror("recv");
- printf("socket closed (or no data received) (0), skipping loop iteration...\n");
- debugprint(DEBUG_CRIT, "serversockfd socket closed (or no data received) (0), skipping loop iteration, errno '%d'.\n");
+ debugprint(DEBUG_CRIT, "dochat(): server sockread() closed or no data received (0) (%s), skipping loop iteration.\n", strerror(errno));
}
// If there was a socket error (receive error or socket closed)
@@ -723,8 +719,7 @@ void dochat(int *serversockfd, int *clientsockfd, struct settings *settings) {
// connection closed
debugprint(DEBUG_SOME, "bouncer-client: socket %d hung up\n", i);
} else {
- perror("recv");
- debugprint(DEBUG_CRIT, "bouncer-client: socket error, clientnum bytes '%d', errno '%d'.\n", clientnumbytes, errno);
+ debugprint(DEBUG_CRIT, "dochat(): client sockread() error (%s) (%s).\n", clientnumbytes, strerror(errno));
}
// Disconnect the client
disconnectclient(i, clients, &ircdstate, settings);