http://bugs.winehq.org/show_bug.cgi?id=17195
--- Comment #90 from Adam Martinson adam.r.martinson@gmail.com 2012-12-19 11:18:35 CST --- (In reply to comment #89)
- could you merge named_pipe_peek_msg with named_pipe_recv_msg? Or at least
move common code to a function. This way if something breaks, you will have only one place to fix.
I looked into that, doesn't seem reasonable as the behavior is rather different.
Also, this looks suspicious:
while (!(end->flags & NAMED_PIPE_MESSAGE_STREAM_READ) &&
!list_empty( &end->msgs ) &&
reply->result < req->length);
It's the correct behavior, if you're reading a byte stream you might keep going, but if you're reading a message you don't.
I'll upload my updated patches shortly, lemme know what you think.