From 77bed960d22e309f7799aa25da17c3065d1e1eb6 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 28 Apr 2011 17:00:26 +0200 Subject: s4:libcli/smb_composite: move smb2_composite_setpathinfo_create_done() It should be after smb2_composite_setpathinfo_send(). metze --- source4/libcli/smb_composite/smb2.c | 45 +++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 22 deletions(-) (limited to 'source4/libcli') diff --git a/source4/libcli/smb_composite/smb2.c b/source4/libcli/smb_composite/smb2.c index c4db7f8fbb..972b3b0f4e 100644 --- a/source4/libcli/smb_composite/smb2.c +++ b/source4/libcli/smb_composite/smb2.c @@ -289,28 +289,7 @@ static void smb2_composite_setpathinfo_setinfo_done(struct smb2_request *smb2req composite_continue_smb2(ctx, smb2req, smb2_composite_setpathinfo_close_done, ctx); } -static void smb2_composite_setpathinfo_create_done(struct smb2_request *smb2req) -{ - struct composite_context *ctx = talloc_get_type(smb2req->async.private_data, - struct composite_context); - 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(smb2req, ctx, &create_parm); - if (!NT_STATUS_IS_OK(status)) { - composite_error(ctx, status); - return; - } - - io2->generic.in.file.handle = create_parm.out.file.handle; - - smb2req = smb2_setinfo_file_send(tree, io2); - composite_continue_smb2(ctx, smb2req, smb2_composite_setpathinfo_setinfo_done, ctx); -} - +static void smb2_composite_setpathinfo_create_done(struct smb2_request *smb2req); /* composite SMB2 setpathinfo call @@ -353,6 +332,28 @@ struct composite_context *smb2_composite_setpathinfo_send(struct smb2_tree *tree return ctx; } +static void smb2_composite_setpathinfo_create_done(struct smb2_request *smb2req) +{ + struct composite_context *ctx = talloc_get_type(smb2req->async.private_data, + struct composite_context); + 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(smb2req, ctx, &create_parm); + if (!NT_STATUS_IS_OK(status)) { + composite_error(ctx, status); + return; + } + + io2->generic.in.file.handle = create_parm.out.file.handle; + + smb2req = smb2_setinfo_file_send(tree, io2); + composite_continue_smb2(ctx, smb2req, smb2_composite_setpathinfo_setinfo_done, ctx); +} + static void smb2_composite_setpathinfo_close_done(struct smb2_request *smb2req) { struct composite_context *ctx = talloc_get_type(smb2req->async.private_data, -- cgit