s4:librpc/rpc: remove pipe_np_smb2_state and use pipe_np_smb_state
authorStefan Metzmacher <metze@samba.org>
Wed, 15 Jan 2014 11:58:52 +0000 (12:58 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 26 May 2014 01:31:28 +0000 (03:31 +0200)
There's no need for two almost identical structures.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/librpc/rpc/dcerpc_connect.c

index 7b1ed48db8c589c31828d03717990f26c3f418a1..42ca0df755fc175636fbfb7b5f857f9ec049cb7d 100644 (file)
@@ -191,12 +191,6 @@ static NTSTATUS dcerpc_pipe_connect_ncacn_np_smb_recv(struct composite_context *
        return status;
 }
 
        return status;
 }
 
-
-struct pipe_np_smb2_state {
-       struct dcerpc_pipe_connect io;
-};
-
-
 /*
   Stage 3 of ncacn_np_smb: Named pipe opened (or not)
 */
 /*
   Stage 3 of ncacn_np_smb: Named pipe opened (or not)
 */
@@ -222,8 +216,8 @@ static void continue_smb2_connect(struct tevent_req *subreq)
        struct composite_context *c =
                tevent_req_callback_data(subreq,
                struct composite_context);
        struct composite_context *c =
                tevent_req_callback_data(subreq,
                struct composite_context);
-       struct pipe_np_smb2_state *s = talloc_get_type(c->private_data,
-                                                      struct pipe_np_smb2_state);
+       struct pipe_np_smb_state *s = talloc_get_type(c->private_data,
+                                                     struct pipe_np_smb_state);
        struct smb2_tree *t;
 
        /* receive result of smb2 connect request */
        struct smb2_tree *t;
 
        /* receive result of smb2 connect request */
@@ -260,7 +254,7 @@ static struct composite_context *dcerpc_pipe_connect_ncacn_np_smb2_send(
                                        struct loadparm_context *lp_ctx)
 {
        struct composite_context *c;
                                        struct loadparm_context *lp_ctx)
 {
        struct composite_context *c;
-       struct pipe_np_smb2_state *s;
+       struct pipe_np_smb_state *s;
        struct tevent_req *subreq;
        struct smbcli_options options;
        const char *host;
        struct tevent_req *subreq;
        struct smbcli_options options;
        const char *host;
@@ -270,7 +264,7 @@ static struct composite_context *dcerpc_pipe_connect_ncacn_np_smb2_send(
        c = composite_create(mem_ctx, io->conn->event_ctx);
        if (c == NULL) return NULL;
 
        c = composite_create(mem_ctx, io->conn->event_ctx);
        if (c == NULL) return NULL;
 
-       s = talloc_zero(c, struct pipe_np_smb2_state);
+       s = talloc_zero(c, struct pipe_np_smb_state);
        if (composite_nomem(s, c)) return c;
        c->private_data = s;
 
        if (composite_nomem(s, c)) return c;
        c->private_data = s;