diff options
author | Luk Claes <luk@debian.org> | 2012-05-26 11:58:34 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-06-03 23:37:02 +0200 |
commit | aea996dba6d99d75b508628118c268f8f0619191 (patch) | |
tree | 9f3361c5c1082fcc6b06759d1e0911015c5614b0 /source3/libsmb | |
parent | 9c80b91d8f793ad97736d8fb75566ca4d907e9cd (diff) | |
download | samba-aea996dba6d99d75b508628118c268f8f0619191.tar.gz samba-aea996dba6d99d75b508628118c268f8f0619191.tar.bz2 samba-aea996dba6d99d75b508628118c268f8f0619191.zip |
s3:libsmb: get rid of cli_smb_req_*,cli_smb_wct_ofs,cli_smb_chain_send
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Jun 3 23:37:02 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/async_smb.c | 39 | ||||
-rw-r--r-- | source3/libsmb/cliconnect.c | 4 | ||||
-rw-r--r-- | source3/libsmb/clifile.c | 4 | ||||
-rw-r--r-- | source3/libsmb/clioplock.c | 2 | ||||
-rw-r--r-- | source3/libsmb/clireadwrite.c | 6 |
5 files changed, 8 insertions, 47 deletions
diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c index 62aaa5646c..e30435a225 100644 --- a/source3/libsmb/async_smb.c +++ b/source3/libsmb/async_smb.c @@ -23,30 +23,6 @@ #include "async_smb.h" #include "../libcli/smb/smbXcli_base.h" -/* - * Fetch a smb request's mid. Only valid after the request has been sent by - * cli_smb_req_send(). - */ -uint16_t cli_smb_req_mid(struct tevent_req *req) -{ - return smb1cli_req_mid(req); -} - -void cli_smb_req_set_mid(struct tevent_req *req, uint16_t mid) -{ - smb1cli_req_set_mid(req, mid); -} - -uint32_t cli_smb_req_seqnum(struct tevent_req *req) -{ - return smb1cli_req_seqnum(req); -} - -void cli_smb_req_set_seqnum(struct tevent_req *req, uint32_t seqnum) -{ - smb1cli_req_set_seqnum(req, seqnum); -} - struct cli_smb_req_state { struct cli_state *cli; uint8_t smb_command; @@ -131,11 +107,6 @@ struct tevent_req *cli_smb_req_create(TALLOC_CTX *mem_ctx, return state->req; } -NTSTATUS cli_smb_req_send(struct tevent_req *req) -{ - return smb1cli_req_chain_submit(&req, 1); -} - struct tevent_req *cli_smb_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct cli_state *cli, @@ -308,13 +279,3 @@ NTSTATUS cli_smb_recv(struct tevent_req *req, return status; } - -size_t cli_smb_wct_ofs(struct tevent_req **reqs, int num_reqs) -{ - return smb1cli_req_wct_ofs(reqs, num_reqs); -} - -NTSTATUS cli_smb_chain_send(struct tevent_req **reqs, int num_reqs) -{ - return smb1cli_req_chain_submit(reqs, num_reqs); -} diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 9481e75e64..0858be996c 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -453,7 +453,7 @@ struct tevent_req *cli_session_setup_guest_send(TALLOC_CTX *mem_ctx, return NULL; } - status = cli_smb_req_send(subreq); + status = smb1cli_req_chain_submit(&subreq, 1); if (NT_STATUS_IS_OK(status)) { tevent_req_nterror(req, status); return tevent_req_post(req, ev); @@ -2395,7 +2395,7 @@ struct tevent_req *cli_tcon_andx_send(TALLOC_CTX *mem_ctx, if (subreq == NULL) { return req; } - status = cli_smb_req_send(subreq); + status = smb1cli_req_chain_submit(&subreq, 1); if (!NT_STATUS_IS_OK(status)) { tevent_req_nterror(req, status); return tevent_req_post(req, ev); diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index 3bdb49d6d4..b762a377c1 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -2226,7 +2226,7 @@ struct tevent_req *cli_openx_send(TALLOC_CTX *mem_ctx, struct event_context *ev, return NULL; } - status = cli_smb_req_send(subreq); + status = smb1cli_req_chain_submit(&subreq, 1); if (tevent_req_nterror(req, status)) { return tevent_req_post(req, ev); } @@ -2472,7 +2472,7 @@ struct tevent_req *cli_close_send(TALLOC_CTX *mem_ctx, return NULL; } - status = cli_smb_req_send(subreq); + status = smb1cli_req_chain_submit(&subreq, 1); if (tevent_req_nterror(req, status)) { return tevent_req_post(req, ev); } diff --git a/source3/libsmb/clioplock.c b/source3/libsmb/clioplock.c index e6c20e44e7..2c5ec0b8b3 100644 --- a/source3/libsmb/clioplock.c +++ b/source3/libsmb/clioplock.c @@ -51,7 +51,7 @@ struct tevent_req *cli_smb_oplock_break_waiter_send(TALLOC_CTX *mem_ctx, if (tevent_req_nomem(subreq, req)) { return tevent_req_post(req, ev); } - cli_smb_req_set_mid(subreq, 0xffff); + smb1cli_req_set_mid(subreq, 0xffff); if (!smbXcli_req_set_pending(subreq)) { tevent_req_nterror(req, NT_STATUS_NO_MEMORY); diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c index f2e1dbf0ac..b7ee7d5911 100644 --- a/source3/libsmb/clireadwrite.c +++ b/source3/libsmb/clireadwrite.c @@ -194,7 +194,7 @@ struct tevent_req *cli_read_andx_send(TALLOC_CTX *mem_ctx, return NULL; } - status = cli_smb_req_send(subreq); + status = smb1cli_req_chain_submit(&subreq, 1); if (tevent_req_nterror(req, status)) { return tevent_req_post(req, ev); } @@ -867,7 +867,7 @@ struct tevent_req *cli_write_andx_create(TALLOC_CTX *mem_ctx, SSVAL(vwv+10, 0, state->size); SSVAL(vwv+11, 0, - cli_smb_wct_ofs(reqs_before, num_reqs_before) + smb1cli_req_wct_ofs(reqs_before, num_reqs_before) + 1 /* the wct field */ + wct * 2 /* vwv */ + 2 /* num_bytes field */ @@ -908,7 +908,7 @@ struct tevent_req *cli_write_andx_send(TALLOC_CTX *mem_ctx, return NULL; } - status = cli_smb_req_send(subreq); + status = smb1cli_req_chain_submit(&subreq, 1); if (tevent_req_nterror(req, status)) { return tevent_req_post(req, ev); } |