From 7305660c1139fc1d2dc40fb3324855ec7381eac5 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 22 Sep 2012 18:57:47 +0200 Subject: [PATCH] s3: Convert cli_oplock_break_waiter to smbXcli --- source3/libsmb/clioplock.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/source3/libsmb/clioplock.c b/source3/libsmb/clioplock.c index fdf573e6e06..d9ab4145e2d 100644 --- a/source3/libsmb/clioplock.c +++ b/source3/libsmb/clioplock.c @@ -47,7 +47,8 @@ struct tevent_req *cli_smb_oplock_break_waiter_send(TALLOC_CTX *mem_ctx, * Create a fake SMB request that we will never send out. This is only * used to be set into the pending queue with the right mid. */ - subreq = cli_smb_req_create(mem_ctx, ev, cli, 0, 0, 0, NULL, 0, NULL); + subreq = smb1cli_req_create(mem_ctx, ev, cli->conn, 0, 0, 0, 0, 0, 0, + 0, NULL, NULL, 0, NULL, 0, NULL); if (tevent_req_nomem(subreq, req)) { return tevent_req_post(req, ev); } @@ -67,19 +68,31 @@ static void cli_smb_oplock_break_waiter_done(struct tevent_req *subreq) subreq, struct tevent_req); struct cli_smb_oplock_break_waiter_state *state = tevent_req_data( req, struct cli_smb_oplock_break_waiter_state); + struct iovec *iov; uint8_t wct; uint16_t *vwv; - uint32_t num_bytes; - uint8_t *bytes; NTSTATUS status; - status = cli_smb_recv(subreq, state, NULL, 8, &wct, &vwv, - &num_bytes, &bytes); + status = smb1cli_req_recv(subreq, state, + &iov, /* piov */ + NULL, /* phdr */ + &wct, + &vwv, + NULL, /* pvwv_offset */ + NULL, /* pnum_bytes */ + NULL, /* pbytes */ + NULL, /* pbytes_offset */ + NULL, /* pinbuf */ + NULL, 0); /* expected */ TALLOC_FREE(subreq); if (!NT_STATUS_IS_OK(status)) { tevent_req_nterror(req, status); return; } + if (wct < 8) { + tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE); + return; + } state->fnum = SVAL(vwv+2, 0); state->level = CVAL(vwv+3, 1); tevent_req_done(req); -- 2.11.4.GIT