libsmbclient: Fix cli_session_setup_guest_send
authorVolker Lendecke <vl@samba.org>
Wed, 3 Apr 2013 11:24:53 +0000 (13:24 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 3 Apr 2013 16:39:30 +0000 (18:39 +0200)
This worked fine so far, but for the wrong reason: We only ever called
this through the sync wrapper. The tevent_req_nterror in the NT_STATUS_OK
case does not call tevent_req_finish. So the tevent_loop_poll did call
into the core send/receive smb code. This is a fix for the case when
smb1cli_req_chain_submit fails for some reason.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Apr  3 18:39:30 CEST 2013 on sn-devel-104

source3/libsmb/cliconnect.c

index 872900c6f3a1eb257e6b3235963e28626927854d..ec5c273cf3a3b7f31dbb63261d3865b593fc32c6 100644 (file)
@@ -446,7 +446,7 @@ struct tevent_req *cli_session_setup_guest_send(TALLOC_CTX *mem_ctx,
        }
 
        status = smb1cli_req_chain_submit(&subreq, 1);
-       if (NT_STATUS_IS_OK(status)) {
+       if (!NT_STATUS_IS_OK(status)) {
                tevent_req_nterror(req, status);
                return tevent_req_post(req, ev);
        }