From: Joseph Sutton Date: Fri, 29 Apr 2022 00:20:06 +0000 (+1200) Subject: tevent: Fix flag clearing X-Git-Tag: talloc-2.4.0~779 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a91fa70ad568bbca34dc9d09e098686b8482d0ed;p=thirdparty%2Fsamba.git tevent: Fix flag clearing We presumably meant to clear this bit, rather than clearing all bits other than it. Signed-off-by: Joseph Sutton Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Mon Oct 3 21:05:31 UTC 2022 on sn-devel-184 --- diff --git a/lib/tevent/tevent_port.c b/lib/tevent/tevent_port.c index ccb65a711b2..defa84cfc21 100644 --- a/lib/tevent/tevent_port.c +++ b/lib/tevent/tevent_port.c @@ -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);