tevent: Fix flag clearing
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Fri, 29 Apr 2022 00:20:06 +0000 (12:20 +1200)
committerJeremy Allison <jra@samba.org>
Mon, 3 Oct 2022 21:05:31 +0000 (21:05 +0000)
We presumably meant to clear this bit, rather than clearing all bits
other than it.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Oct  3 21:05:31 UTC 2022 on sn-devel-184

lib/tevent/tevent_port.c

index ccb65a711b2b29b456b6d417efb4f3b1dad3bf06..defa84cfc213fc67a76f74bf84d643802ddc6b0f 100644 (file)
@@ -220,7 +220,7 @@ static int port_check_reopen(struct port_event_context *port_ev)
 
        port_ev->pid = pid;
        for (fde=port_ev->ev->fd_events;fde;fde=fde->next) {
-               fde->additional_flags &= PORT_ADDITIONAL_FD_FLAG_HAS_ASSOCIATION;
+               fde->additional_flags &= ~PORT_ADDITIONAL_FD_FLAG_HAS_ASSOCIATION;
                if (port_update_event(port_ev, fde) != 0) {
                        return -1;
                }
@@ -670,7 +670,7 @@ static int port_event_fd_destructor(struct tevent_fd *fde)
                fde->additional_data = NULL;
                mpx_fde->additional_data = NULL;
 
-               fde->additional_flags &= PORT_ADDITIONAL_FD_FLAG_HAS_ASSOCIATION;
+               fde->additional_flags &= ~PORT_ADDITIONAL_FD_FLAG_HAS_ASSOCIATION;
        }
 
        (void)port_check_reopen(port_ev);