[Bug 17195] NamedPipe datagrams need to be _really_ datagrams

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Dec 19 02:58:36 CST 2012


http://bugs.winehq.org/show_bug.cgi?id=17195

--- Comment #89 from Daniel Jelinski <djelinski1 at gmail.com> 2012-12-19 02:58:36 CST ---
(In reply to comment #88)
> Think I've got the first 3 split apart pretty well, any ideas on splitting the
> last one?  I don't know how I would without breaking stuff in between...

Yes, it seems that you can't split this one. You can improve its readability in
a different way:
- in several places you are checking if the pipe is in message write mode. This
check takes a lot of space, so you should probably put it into a function.
- 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.

Also, this looks suspicious:
+            while (!(end->flags & NAMED_PIPE_MESSAGE_STREAM_READ) &&
+                   !list_empty( &end->msgs ) &&
+                   reply->result < req->length);

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list