HACK libcli/smb/tstream_smbXcli_np.c close...
authorStefan Metzmacher <metze@samba.org>
Sun, 16 Mar 2014 10:50:39 +0000 (11:50 +0100)
committerStefan Metzmacher <metze@samba.org>
Sun, 16 Mar 2014 10:52:10 +0000 (11:52 +0100)
libcli/smb/tstream_smbXcli_np.c

index cbe7f6f83d34543cc3f15eb94338148374c59b7d..3ae22d1ff342862301d3f7684fad935b27f7c0fd 100644 (file)
@@ -133,6 +133,7 @@ static int tstream_smbXcli_np_destructor(struct tstream_smbXcli_np *cli_nps)
                          "failed on pipe %s. Error was %s\n",
                          cli_nps->npipe, nt_errstr(status)));
        }
+       cli_nps->conn = NULL;
        /*
         * We can't do much on failure
         */
@@ -687,6 +688,8 @@ static void tstream_smbXcli_np_writev_disconnect_now(struct tevent_req *req,
        tevent_req_set_callback(subreq,
                                tstream_smbXcli_np_writev_disconnect_done,
                                req);
+
+       cli_nps->conn = NULL;
 }
 
 static void tstream_smbXcli_np_writev_disconnect_done(struct tevent_req *subreq)
@@ -1164,6 +1167,7 @@ static void tstream_smbXcli_np_readv_disconnect_now(struct tevent_req *req,
        tevent_req_set_callback(subreq,
                                tstream_smbXcli_np_readv_disconnect_done,
                                req);
+       cli_nps->conn = NULL;
 }
 
 static void tstream_smbXcli_np_readv_disconnect_done(struct tevent_req *subreq)
@@ -1303,6 +1307,7 @@ static struct tevent_req *tstream_smbXcli_np_disconnect_send(TALLOC_CTX *mem_ctx
        }
        tevent_req_set_callback(subreq, tstream_smbXcli_np_disconnect_done, req);
 
+       cli_nps->conn = NULL;
        return req;
 }