mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-04-12 21:33:03 +00:00
fixed big fat nasty socket handling bug.
This commit is contained in:
parent
f5c3ea024e
commit
11132c40c9
@ -209,9 +209,10 @@ int monitor_poll()
|
||||
nextInSameSlot:
|
||||
errno=0;
|
||||
int bytes;
|
||||
struct monitor_context *c=&monitor_sockets[monitor_socket_count];
|
||||
struct monitor_context *c=&monitor_sockets[i];
|
||||
fcntl(c->socket,F_SETFL,
|
||||
fcntl(c->socket, F_GETFL, NULL)|O_NONBLOCK);
|
||||
WHYF("looking at monitor socket #%d",i);
|
||||
switch(c->state) {
|
||||
case MONITOR_STATE_COMMAND:
|
||||
bytes=1;
|
||||
@ -285,6 +286,9 @@ int monitor_poll()
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
c->state=MONITOR_STATE_COMMAND;
|
||||
WHY("fixed monitor connection state");
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user