1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-25 06:04:04 +03:00

s4:libcli/smb_composite: better names for smb2_composite_setpathinfo_* funcs and vars

metze
This commit is contained in:
Stefan Metzmacher 2011-04-28 16:42:48 +02:00
parent 01cb5984ac
commit 59651175fc

View File

@ -265,20 +265,17 @@ NTSTATUS smb2_composite_rmdir(struct smb2_tree *tree, struct smb_rmdir *io)
}
/*
continue after the setfileinfo in a composite setpathinfo
*/
static void continue_setpathinfo_close(struct smb2_request *req)
static void smb2_composite_setpathinfo_setinfo_done(struct smb2_request *smb2req)
{
struct composite_context *ctx = talloc_get_type(req->async.private_data,
struct composite_context *ctx = talloc_get_type(smb2req->async.private_data,
struct composite_context);
struct smb2_tree *tree = req->tree;
struct smb2_tree *tree = smb2req->tree;
struct smb2_close close_parm;
NTSTATUS status;
union smb_setfileinfo *io2 = talloc_get_type(ctx->private_data,
union smb_setfileinfo);
status = smb2_setinfo_recv(req);
status = smb2_setinfo_recv(smb2req);
if (!NT_STATUS_IS_OK(status)) {
composite_error(ctx, status);
return;
@ -287,25 +284,21 @@ static void continue_setpathinfo_close(struct smb2_request *req)
ZERO_STRUCT(close_parm);
close_parm.in.file.handle = io2->generic.in.file.handle;
req = smb2_close_send(tree, &close_parm);
composite_continue_smb2(ctx, req, continue_close, ctx);
smb2req = smb2_close_send(tree, &close_parm);
composite_continue_smb2(ctx, smb2req, continue_close, ctx);
}
/*
continue after the create in a composite setpathinfo
*/
static void continue_setpathinfo(struct smb2_request *req)
static void smb2_composite_setpathinfo_create_done(struct smb2_request *smb2req)
{
struct composite_context *ctx = talloc_get_type(req->async.private_data,
struct composite_context *ctx = talloc_get_type(smb2req->async.private_data,
struct composite_context);
struct smb2_tree *tree = req->tree;
struct smb2_tree *tree = smb2req->tree;
struct smb2_create create_parm;
NTSTATUS status;
union smb_setfileinfo *io2 = talloc_get_type(ctx->private_data,
union smb_setfileinfo);
status = smb2_create_recv(req, ctx, &create_parm);
status = smb2_create_recv(smb2req, ctx, &create_parm);
if (!NT_STATUS_IS_OK(status)) {
composite_error(ctx, status);
return;
@ -313,8 +306,8 @@ static void continue_setpathinfo(struct smb2_request *req)
io2->generic.in.file.handle = create_parm.out.file.handle;
req = smb2_setinfo_file_send(tree, io2);
composite_continue_smb2(ctx, req, continue_setpathinfo_close, ctx);
smb2req = smb2_setinfo_file_send(tree, io2);
composite_continue_smb2(ctx, smb2req, smb2_composite_setpathinfo_setinfo_done, ctx);
}
@ -326,7 +319,7 @@ struct composite_context *smb2_composite_setpathinfo_send(struct smb2_tree *tree
{
struct composite_context *ctx;
struct smb2_create create_parm;
struct smb2_request *req;
struct smb2_request *smb2req;
union smb_setfileinfo *io2;
ctx = composite_create(tree, tree->session->transport->socket->event.ctx);
@ -345,7 +338,7 @@ struct composite_context *smb2_composite_setpathinfo_send(struct smb2_tree *tree
create_parm.in.fname++;
}
req = smb2_create_send(tree, &create_parm);
smb2req = smb2_create_send(tree, &create_parm);
io2 = talloc(ctx, union smb_setfileinfo);
if (composite_nomem(io2, ctx)) {
@ -355,7 +348,7 @@ struct composite_context *smb2_composite_setpathinfo_send(struct smb2_tree *tree
ctx->private_data = io2;
composite_continue_smb2(ctx, req, continue_setpathinfo, ctx);
composite_continue_smb2(ctx, smb2req, smb2_composite_setpathinfo_create_done, ctx);
return ctx;
}