From ffb2dcf11b88d6b9aefcbcb1dd04305a04fa3af5 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 28 Apr 2011 17:25:18 +0200 Subject: s4:libcli/smb_composite: move smb2_composite_setpathinfo_setinfo_done() It should be after smb2_composite_setpathinfo_create_done(). metze Autobuild-User: Stefan Metzmacher Autobuild-Date: Thu Apr 28 21:38:53 CEST 2011 on sn-devel-104 --- source4/libcli/smb_composite/smb2.c | 52 +++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 25 deletions(-) (limited to 'source4/libcli/smb_composite') diff --git a/source4/libcli/smb_composite/smb2.c b/source4/libcli/smb_composite/smb2.c index 972b3b0f4e..c2985f2ae8 100644 --- a/source4/libcli/smb_composite/smb2.c +++ b/source4/libcli/smb_composite/smb2.c @@ -264,31 +264,6 @@ NTSTATUS smb2_composite_rmdir(struct smb2_tree *tree, struct smb_rmdir *io) return composite_wait_free(c); } -static void smb2_composite_setpathinfo_close_done(struct smb2_request *smb2req); - -static void smb2_composite_setpathinfo_setinfo_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_close close_parm; - NTSTATUS status; - union smb_setfileinfo *io2 = talloc_get_type(ctx->private_data, - union smb_setfileinfo); - - status = smb2_setinfo_recv(smb2req); - if (!NT_STATUS_IS_OK(status)) { - composite_error(ctx, status); - return; - } - - ZERO_STRUCT(close_parm); - close_parm.in.file.handle = io2->generic.in.file.handle; - - smb2req = smb2_close_send(tree, &close_parm); - composite_continue_smb2(ctx, smb2req, smb2_composite_setpathinfo_close_done, ctx); -} - static void smb2_composite_setpathinfo_create_done(struct smb2_request *smb2req); /* @@ -332,6 +307,8 @@ struct composite_context *smb2_composite_setpathinfo_send(struct smb2_tree *tree return ctx; } +static void smb2_composite_setpathinfo_setinfo_done(struct smb2_request *smb2req); + static void smb2_composite_setpathinfo_create_done(struct smb2_request *smb2req) { struct composite_context *ctx = talloc_get_type(smb2req->async.private_data, @@ -354,6 +331,31 @@ static void smb2_composite_setpathinfo_create_done(struct smb2_request *smb2req) composite_continue_smb2(ctx, smb2req, smb2_composite_setpathinfo_setinfo_done, ctx); } +static void smb2_composite_setpathinfo_close_done(struct smb2_request *smb2req); + +static void smb2_composite_setpathinfo_setinfo_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_close close_parm; + NTSTATUS status; + union smb_setfileinfo *io2 = talloc_get_type(ctx->private_data, + union smb_setfileinfo); + + status = smb2_setinfo_recv(smb2req); + if (!NT_STATUS_IS_OK(status)) { + composite_error(ctx, status); + return; + } + + ZERO_STRUCT(close_parm); + close_parm.in.file.handle = io2->generic.in.file.handle; + + smb2req = smb2_close_send(tree, &close_parm); + composite_continue_smb2(ctx, smb2req, smb2_composite_setpathinfo_close_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