diff --git a/owlps-aggregator/owlps-aggregatord.c b/owlps-aggregator/owlps-aggregatord.c index e4f7276..24caef8 100644 --- a/owlps-aggregator/owlps-aggregatord.c +++ b/owlps-aggregator/owlps-aggregatord.c @@ -434,7 +434,7 @@ int read_loop(int sockfd) { if (owl_run) { - fprintf(stderr, "No request received from client!\n") ; + perror("No request received from listener") ; ret = ERR_NO_MESSAGE_RECEIVED ; } break ; @@ -880,10 +880,10 @@ void* listen_for_aps(void *NULL_value) nread = recvfrom(listen_sockfd, &message, sizeof(message), 0, (struct sockaddr *) &client, &client_len) ; - if (nread <= 0 && owl_run) + if (nread <= 0) { if (owl_run) - fprintf(stderr, "No message received from listener!\n") ; + perror("No message received from listener") ; continue ; }