s4-torture: enable raw.composite test again, and convert to new style test
[samba.git] / source4 / libcli / smb_composite / fsinfo.c
index 6537ef8c924ad2a46c111edbe7b15f41cc792739..242e2cc44567e189b85b7b603840d9c875ee9f38 100644 (file)
@@ -127,7 +127,8 @@ static void fsinfo_composite_handler(struct composite_context *creq)
 */
 struct composite_context *smb_composite_fsinfo_send(struct smbcli_tree *tree, 
                                                    struct smb_composite_fsinfo *io,
-                                                   struct resolve_context *resolve_ctx)
+                                                   struct resolve_context *resolve_ctx,
+                                                   struct tevent_context *event_ctx)
 {
        struct composite_context *c;
        struct fsinfo_state *state;
@@ -135,12 +136,15 @@ struct composite_context *smb_composite_fsinfo_send(struct smbcli_tree *tree,
        c = talloc_zero(tree, struct composite_context);
        if (c == NULL) goto failed;
 
+       c->event_ctx = event_ctx;
+       if (c->event_ctx == NULL) goto failed;
+
        state = talloc(c, struct fsinfo_state);
        if (state == NULL) goto failed;
 
        state->io = io;
 
-       state->connect = talloc(state, struct smb_composite_connect);
+       state->connect = talloc_zero(state, struct smb_composite_connect);
 
        if (state->connect == NULL) goto failed;
 
@@ -201,9 +205,10 @@ NTSTATUS smb_composite_fsinfo_recv(struct composite_context *c, TALLOC_CTX *mem_
 NTSTATUS smb_composite_fsinfo(struct smbcli_tree *tree, 
                              TALLOC_CTX *mem_ctx,
                              struct smb_composite_fsinfo *io,
-                             struct resolve_context *resolve_ctx)
+                             struct resolve_context *resolve_ctx,
+                             struct tevent_context *ev)
 {
-       struct composite_context *c = smb_composite_fsinfo_send(tree, io, resolve_ctx);
+       struct composite_context *c = smb_composite_fsinfo_send(tree, io, resolve_ctx, ev);
        return smb_composite_fsinfo_recv(c, mem_ctx);
 }