summaryrefslogtreecommitdiff
path: root/source4/winbind/wb_samba3_protocol.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2013-06-27 11:28:03 +1000
committerStefan Metzmacher <metze@samba.org>2013-07-10 06:57:06 +0200
commit2505d48e4fbcd8a805a88ad0b05fb1a16a588197 (patch)
treef396d19aceddb99a195d9f23142e6afbe36af57e /source4/winbind/wb_samba3_protocol.c
parentdf929d6feb857668ad9da277213e9fae1480ff63 (diff)
downloadsamba-2505d48e4fbcd8a805a88ad0b05fb1a16a588197.tar.gz
samba-2505d48e4fbcd8a805a88ad0b05fb1a16a588197.tar.bz2
samba-2505d48e4fbcd8a805a88ad0b05fb1a16a588197.zip
s4-winbindd: Do not terminate a connection that is still pending (bug #9820)
Instead, wait until the call attempts to reply, and let it terminate then (often this happens in the attempt to then write to the broken pipe). Andrew Bartlett Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/winbind/wb_samba3_protocol.c')
-rw-r--r--source4/winbind/wb_samba3_protocol.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/winbind/wb_samba3_protocol.c b/source4/winbind/wb_samba3_protocol.c
index 2846e9ce90..1b78c99c1f 100644
--- a/source4/winbind/wb_samba3_protocol.c
+++ b/source4/winbind/wb_samba3_protocol.c
@@ -297,6 +297,8 @@ NTSTATUS wbsrv_samba3_send_reply(struct wbsrv_samba3_call *call)
struct tevent_req *subreq;
NTSTATUS status;
+ call->wbconn->pending_calls--;
+
status = wbsrv_samba3_push_reply(call);
NT_STATUS_NOT_OK_RETURN(status);
@@ -355,9 +357,12 @@ NTSTATUS wbsrv_samba3_process(struct wbsrv_samba3_call *call)
return status;
}
+ call->wbconn->pending_calls++;
+
status = wbsrv_samba3_handle_call(call);
if (!NT_STATUS_IS_OK(status)) {
+ call->wbconn->pending_calls--;
talloc_free(call);
return status;
}