mirror of https://github.com/ericonr/sndio.git
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:
parent
ebdfbab96a
commit
b45b76b8e0
|
@ -1,7 +1,7 @@
|
|||
all:
|
||||
cd libsndio && ${MAKE}
|
||||
cd aucat && ${MAKE}
|
||||
# cd sndiod && ${MAKE}
|
||||
cd sndiod && ${MAKE}
|
||||
cd examples && ${MAKE}
|
||||
|
||||
install:
|
||||
|
|
|
@ -1633,20 +1633,10 @@ sock_write(struct sock *f)
|
|||
log_puts(": copied RRET message\n");
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* XXX:
|
||||
* the rule is to not mix read code paths and
|
||||
* write code paths
|
||||
*/
|
||||
while (sock_read(f))
|
||||
;
|
||||
} else {
|
||||
if (!sock_buildmsg(f))
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
* XXX: if sock_read blocks, we end-up here in
|
||||
* the WMSG state
|
||||
*/
|
||||
if (!sock_buildmsg(f))
|
||||
return 0;
|
||||
break;
|
||||
#ifdef DEBUG
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue