Remove use of global_loadparm.
authorJelmer Vernooij <jelmer@samba.org>
Thu, 28 Feb 2008 19:30:03 +0000 (20:30 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Thu, 28 Feb 2008 19:30:03 +0000 (20:30 +0100)
source/libcli/smb_composite/fetchfile.c
source/libcli/smb_composite/smb_composite.h
source/torture/raw/composite.c

index e4312794c9236eddfc9935d898c55831970526c3..d8d7481270fbb573367e2fc8c49a171dc2c76fde 100644 (file)
@@ -150,7 +150,7 @@ struct composite_context *smb_composite_fetchfile_send(struct smb_composite_fetc
        state->connect->in.options      = io->in.options;
 
        state->creq = smb_composite_connect_send(state->connect, state, 
-                                                lp_resolve_context(global_loadparm), event_ctx);
+                                                io->in.resolve_ctx, event_ctx);
        if (state->creq == NULL) goto failed;
 
        state->creq->async.private_data = c;
index 964ffb09367be293fd48edac651fd9c7f541dc8c..e7e131869c95decb5e59583ea823fca05a282e32 100644 (file)
@@ -56,6 +56,7 @@ struct smb_composite_fetchfile {
                const char *workgroup;
                const char *filename;
                struct smbcli_options options;
+               struct resolve_context *resolve_ctx;
        } in;
        struct {
                uint8_t *data;
index 7238a2fd465062fe82c1aaf8e8ac66e0fe1f84e7..1f31fbc51528e7530966b48164a6adc69d0a1098 100644 (file)
@@ -31,6 +31,7 @@
 #include "lib/cmdline/popt_common.h"
 #include "torture/util.h"
 #include "param/param.h"
+#include "libcli/resolve/resolve.h"
 
 #define BASEDIR "\\composite"
 
@@ -161,6 +162,7 @@ static bool test_fetchfile(struct smbcli_state *cli, struct torture_context *tct
        io2.in.credentials = cmdline_credentials;
        io2.in.workgroup  = lp_workgroup(tctx->lp_ctx);
        io2.in.filename = fname;
+       io2.in.resolve_ctx = lp_resolve_context(tctx->lp_ctx);
        lp_smbcli_options(tctx->lp_ctx, &io2.in.options);
 
        printf("testing parallel fetchfile with %d ops\n", torture_numops);