diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-07-23 22:32:49 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-07-24 22:20:06 +0200 |
commit | 32b33999dbc5c73f5efd04e3ae0ab5a0b13c7cc2 (patch) | |
tree | db5617c8587603cd51848a55f65087a417db510b /libcli | |
parent | 92efe1a35ff007919e9c23a066a702be8cfd0a9f (diff) | |
download | samba-32b33999dbc5c73f5efd04e3ae0ab5a0b13c7cc2.tar.gz samba-32b33999dbc5c73f5efd04e3ae0ab5a0b13c7cc2.tar.bz2 samba-32b33999dbc5c73f5efd04e3ae0ab5a0b13c7cc2.zip |
libcli/smb: pass smbXcli_tcon to smb2cli_create*()
metze
Diffstat (limited to 'libcli')
-rw-r--r-- | libcli/smb/smb2cli_create.c | 14 | ||||
-rw-r--r-- | libcli/smb/smbXcli_base.h | 4 |
2 files changed, 12 insertions, 6 deletions
diff --git a/libcli/smb/smb2cli_create.c b/libcli/smb/smb2cli_create.c index 29b0396815..33af378f90 100644 --- a/libcli/smb/smb2cli_create.c +++ b/libcli/smb/smb2cli_create.c @@ -49,7 +49,7 @@ struct tevent_req *smb2cli_create_send( struct smbXcli_conn *conn, uint32_t timeout_msec, struct smbXcli_session *session, - uint32_t tcon_id, + struct smbXcli_tcon *tcon, const char *filename, uint8_t oplock_level, /* SMB2_OPLOCK_LEVEL_* */ uint32_t impersonation_level, /* SMB2_IMPERSONATION_* */ @@ -70,6 +70,7 @@ struct tevent_req *smb2cli_create_send( size_t blobs_offset; uint8_t *dyn; size_t dyn_len; + uint32_t tcon_id = 0; req = tevent_req_create(mem_ctx, &state, struct smb2cli_create_state); @@ -137,6 +138,10 @@ struct tevent_req *smb2cli_create_send( data_blob_free(&blob); } + if (tcon) { + tcon_id = smb2cli_tcon_current_id(tcon); + } + subreq = smb2cli_req_send(state, ev, conn, SMB2_OP_CREATE, 0, 0, /* flags */ timeout_msec, @@ -231,7 +236,7 @@ NTSTATUS smb2cli_create_recv(struct tevent_req *req, NTSTATUS smb2cli_create(struct smbXcli_conn *conn, uint32_t timeout_msec, struct smbXcli_session *session, - uint32_t tcon_id, + struct smbXcli_tcon *tcon, const char *filename, uint8_t oplock_level, /* SMB2_OPLOCK_LEVEL_* */ uint32_t impersonation_level, /* SMB2_IMPERSONATION_* */ @@ -260,8 +265,9 @@ NTSTATUS smb2cli_create(struct smbXcli_conn *conn, if (ev == NULL) { goto fail; } - req = smb2cli_create_send(frame, ev, conn, timeout_msec, session, - tcon_id, filename, oplock_level, + req = smb2cli_create_send(frame, ev, conn, timeout_msec, + session, tcon, + filename, oplock_level, impersonation_level, desired_access, file_attributes, share_access, create_disposition, create_options, diff --git a/libcli/smb/smbXcli_base.h b/libcli/smb/smbXcli_base.h index a105c8278b..e65ff144aa 100644 --- a/libcli/smb/smbXcli_base.h +++ b/libcli/smb/smbXcli_base.h @@ -322,7 +322,7 @@ struct tevent_req *smb2cli_create_send( struct smbXcli_conn *conn, uint32_t timeout_msec, struct smbXcli_session *session, - uint32_t tcon_id, + struct smbXcli_tcon *tcon, const char *filename, uint8_t oplock_level, /* SMB2_OPLOCK_LEVEL_* */ uint32_t impersonation_level, /* SMB2_IMPERSONATION_* */ @@ -338,7 +338,7 @@ NTSTATUS smb2cli_create_recv(struct tevent_req *req, NTSTATUS smb2cli_create(struct smbXcli_conn *conn, uint32_t timeout_msec, struct smbXcli_session *session, - uint32_t tcon_id, + struct smbXcli_tcon *tcon, const char *filename, uint8_t oplock_level, /* SMB2_OPLOCK_LEVEL_* */ uint32_t impersonation_level, /* SMB2_IMPERSONATION_* */ |