desktop: when in the CLI, use blocking writes

this prevents us missing information from the logs
This commit is contained in:
Andrew Tridgell 2011-11-11 09:53:31 +11:00
parent 657dc8c12a
commit 8a3ea5bfff
1 changed files with 5 additions and 1 deletions

View File

@ -295,11 +295,15 @@ void FastSerial::flush(void)
void FastSerial::write(uint8_t c)
{
struct tcp_state *s = &tcp_state[_u2x];
int flags = MSG_NOSIGNAL;
check_connection(s);
if (!s->connected) {
return;
}
send(s->fd, &c, 1, MSG_DONTWAIT | MSG_NOSIGNAL);
if (!desktop_state.slider) {
flags |= MSG_DONTWAIT;
}
send(s->fd, &c, 1, flags);
}
// Buffer management ///////////////////////////////////////////////////////////