libcli/smb: pass smbXcli_tcon to smb2cli_req_create/send()
[nivanova/samba-autobuild/.git] / libcli / smb / smb2cli_query_directory.c
index 4ff93de68d0f3fd391e128fa1f70521eb1d77bab..781efbd06640dfce87c5cc5f3d02035fa95583c1 100644 (file)
@@ -52,7 +52,6 @@ struct tevent_req *smb2cli_query_directory_send(TALLOC_CTX *mem_ctx,
        uint8_t *fixed;
        uint8_t *dyn;
        size_t dyn_len;
-       uint32_t tcon_id = 0;
 
        req = tevent_req_create(mem_ctx, &state,
                                struct smb2cli_query_directory_state);
@@ -88,15 +87,11 @@ struct tevent_req *smb2cli_query_directory_send(TALLOC_CTX *mem_ctx,
                dyn_len = sizeof(state->dyn_pad);
        }
 
-       if (tcon) {
-               tcon_id = smb2cli_tcon_current_id(tcon);
-       }
-
        subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_FIND,
                                  0, 0, /* flags */
                                  timeout_msec,
                                  0xFEFF, /* pid */
-                                 tcon_id,
+                                 tcon,
                                  session,
                                  state->fixed, sizeof(state->fixed),
                                  dyn, dyn_len);