s4:gentest: get the tid from the smbcli_tree struct
authorStefan Metzmacher <metze@samba.org>
Mon, 28 Nov 2011 19:46:19 +0000 (20:46 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 29 Nov 2011 15:00:08 +0000 (16:00 +0100)
metze

source4/torture/gentest.c

index c7e32de359b81531c09b4b7590f1ece29724960b..91b60e2c4e795c7adf462a1a65e13cab37b1abec 100644 (file)
@@ -2467,10 +2467,12 @@ static void async_notify_smb(struct smbcli_request *req)
        union smb_notify notify;
        NTSTATUS status;
        int i, j;
-       uint16_t tid;
+       uint16_t tid = 0;
        struct smbcli_transport *transport = req->transport;
 
-       tid = SVAL(req->in.hdr, HDR_TID);
+       if (req->tree) {
+               tid = req->tree->tid;
+       }
 
        notify.nttrans.level = RAW_NOTIFY_NTTRANS;
        status = smb_raw_changenotify_recv(req, current_op.mem_ctx, &notify);