dont call sock_read() on the write path; the reader state

is SOCK_RMSG and sock_read() will be called from the poll loop
This commit is contained in:
Alexandre Ratchov 2012-11-07 09:54:02 +01:00
parent ebdfbab96a
commit b45b76b8e0
2 changed files with 4 additions and 14 deletions

View File

@ -1,7 +1,7 @@
all: all:
cd libsndio && ${MAKE} cd libsndio && ${MAKE}
cd aucat && ${MAKE} cd aucat && ${MAKE}
# cd sndiod && ${MAKE} cd sndiod && ${MAKE}
cd examples && ${MAKE} cd examples && ${MAKE}
install: install:

View File

@ -1633,20 +1633,10 @@ sock_write(struct sock *f)
log_puts(": copied RRET message\n"); log_puts(": copied RRET message\n");
} }
#endif #endif
/* } else {
* XXX: if (!sock_buildmsg(f))
* the rule is to not mix read code paths and return 0;
* write code paths
*/
while (sock_read(f))
;
} }
/*
* XXX: if sock_read blocks, we end-up here in
* the WMSG state
*/
if (!sock_buildmsg(f))
return 0;
break; break;
#ifdef DEBUG #ifdef DEBUG
default: default: