s3:libsmb: notify all request about failures in cli_smb_req_set_pending()
authorStefan Metzmacher <metze@samba.org>
Thu, 11 Aug 2011 10:26:31 +0000 (12:26 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 12 Aug 2011 09:08:00 +0000 (11:08 +0200)
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

index 60ba1e550f34b0e1502679cae21f1a49c9a75c88..2744f8135a51d8490b92d510d89991390f1ffdff 100644 (file)
@@ -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;
        }