[PATCH] Fix ETIME handling for Solaris event ports

Stefan Metzmacher metze at samba.org
Thu Feb 4 23:32:55 UTC 2016


Hi Jeremy,

can we minimize the diff please?

Something this would be nicer,
while replacing "some useful comment" with some comments
which explain what you've discussed in this thread.


--- a/lib/tevent/tevent_port.c
+++ b/lib/tevent/tevent_port.c
@@ -497,9 +497,18 @@ static int port_event_loop(struct
port_event_context *port_ev, struct timeval *t
        }

        if (ret == -1 && port_errno == ETIME && tvalp) {
-               /* we don't care about a possible delay here */
-               tevent_common_loop_timer_delay(ev);
-               return 0;
+               /*
+                * some useful comment
+                */
+               if (nget == 0) {
+                       /* we don't care about a possible delay here */
+                       tevent_common_loop_timer_delay(ev);
+                       return 0;
+               }
+               /*
+                * some useful comment
+                */
+		errno = 0;
+               ret = 0;
        }

        if (ret == -1) {

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160205/a7e69cba/signature.sig>


More information about the samba-technical mailing list