From 56d3c91af70809fbdd86de888ac983a41e070ca3 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 11 Aug 2011 12:26:31 +0200 Subject: [PATCH] s3:libsmb: notify all request about failures in cli_smb_req_set_pending() It's up to the caller to notify the current request, but we have to notify all other pending requests if we're not able to read the next response from the server. metze --- source3/libsmb/async_smb.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c index 60ba1e550f3..2744f8135a5 100644 --- a/source3/libsmb/async_smb.c +++ b/source3/libsmb/async_smb.c @@ -211,7 +211,14 @@ bool cli_smb_req_set_pending(struct tevent_req *req) talloc_set_destructor(req, cli_smb_req_destructor); if (!cli_state_receive_next(cli)) { + /* + * the caller should notify the current request + * + * And all other pending requests get notified + * by cli_state_notify_pending(). + */ cli_smb_req_unset_pending(req); + cli_state_notify_pending(cli, NT_STATUS_NO_MEMORY); return false; } -- 2.34.1