mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-02-21 01:42:18 +00:00
Reduce monitor.c debug output a bit
This commit is contained in:
parent
fe25f06129
commit
e39ab01903
10
monitor.c
10
monitor.c
@ -230,7 +230,7 @@ int monitor_poll()
|
||||
fcntl(monitor_named_socket,F_SETFL,
|
||||
fcntl(monitor_named_socket, F_GETFL, NULL)|O_NONBLOCK);
|
||||
}
|
||||
DEBUG_perror("accept"); //XXX
|
||||
if (errno != EAGAIN) WHY_perror("accept");
|
||||
|
||||
/* Read from any open connections */
|
||||
int i;
|
||||
@ -256,12 +256,16 @@ int monitor_poll()
|
||||
DEBUG("read"); //XXX
|
||||
bytes=read(c->socket,&c->line[c->line_length],1);
|
||||
if (bytes<1) {
|
||||
DEBUG_perror("read"); //XXX
|
||||
switch(errno) {
|
||||
case EAGAIN: case EINTR: case ENOTRECOVERABLE:
|
||||
case EINTR:
|
||||
case ENOTRECOVERABLE:
|
||||
/* transient errors */
|
||||
WHY_perror("read");
|
||||
break;
|
||||
case EAGAIN:
|
||||
break;
|
||||
default:
|
||||
WHY_perror("read");
|
||||
/* all other errors; close socket */
|
||||
WHYF("Tearing down monitor client #%d due to errno=%d (%s)",
|
||||
i,errno,strerror(errno)?strerror(errno):"<unknown error>");
|
||||
|
Loading…
x
Reference in New Issue
Block a user