messaging: Disable the correct fde on error
authorVolker Lendecke <vl@samba.org>
Fri, 30 Sep 2016 13:42:40 +0000 (06:42 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 4 Oct 2016 22:06:23 +0000 (00:06 +0200)
We might be called from different event contexts and thus
via different fde's

Signed-off-by: Volker Lendecke <vl@samba.org>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/messages_dgm.c

index 1e018174ff13cef4c5a98f3bbea76deb24ff3e2b..6cfaf5cd9c6c9a06365aa36fc68c213cc496b4be 100644 (file)
@@ -1026,7 +1026,7 @@ static void messaging_dgm_read_handler(struct tevent_context *ev,
                        return;
                }
                /* Problem with the socket. Set it unreadable. */
-               tevent_fd_set_flags(ctx->read_fde, 0);
+               tevent_fd_set_flags(fde, 0);
                return;
        }