X-Git-Url: http://git.samba.org/samba.git/?a=blobdiff_plain;f=source4%2Flibcli%2Fsmb_composite%2Ffetchfile.c;h=cbe2289a55f05ad9acd82df63030568423e7a6f2;hb=23302413b3fc9cb3695a255b1ea6883f029b46fe;hp=5783a3258f733086c4c79d5bea3b467c5e614f65;hpb=d4de4c2d210d2e8c9b5aedf70695594809ad6a0b;p=sfrench%2Fsamba-autobuild%2F.git diff --git a/source4/libcli/smb_composite/fetchfile.c b/source4/libcli/smb_composite/fetchfile.c index 5783a3258f7..cbe2289a55f 100644 --- a/source4/libcli/smb_composite/fetchfile.c +++ b/source4/libcli/smb_composite/fetchfile.c @@ -5,7 +5,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -14,8 +14,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ /* a composite API for loading a whole file into memory @@ -24,6 +23,7 @@ #include "includes.h" #include "libcli/composite/composite.h" #include "libcli/smb_composite/smb_composite.h" +#include "libcli/resolve/resolve.h" enum fetchfile_stage {FETCHFILE_CONNECT, FETCHFILE_READ}; @@ -61,7 +61,6 @@ static NTSTATUS fetchfile_connect(struct composite_context *c, state->creq->async.fn = fetchfile_composite_handler; state->stage = FETCHFILE_READ; - c->event_ctx = talloc_reference(c, state->creq->event_ctx); return NT_STATUS_OK; } @@ -138,15 +137,20 @@ struct composite_context *smb_composite_fetchfile_send(struct smb_composite_fetc state->io = io; state->connect->in.dest_host = io->in.dest_host; - state->connect->in.port = io->in.port; + state->connect->in.dest_ports = io->in.ports; state->connect->in.called_name = io->in.called_name; state->connect->in.service = io->in.service; state->connect->in.service_type = io->in.service_type; state->connect->in.credentials = io->in.credentials; - state->connect->in.fallback_to_anonymous = False; + state->connect->in.fallback_to_anonymous = false; state->connect->in.workgroup = io->in.workgroup; + state->connect->in.iconv_convenience = io->in.iconv_convenience; - state->creq = smb_composite_connect_send(state->connect, state, event_ctx); + state->connect->in.options = io->in.options; + state->connect->in.session_options = io->in.session_options; + + state->creq = smb_composite_connect_send(state->connect, state, + io->in.resolve_ctx, event_ctx); if (state->creq == NULL) goto failed; state->creq->async.private_data = c; @@ -154,7 +158,6 @@ struct composite_context *smb_composite_fetchfile_send(struct smb_composite_fetc c->state = COMPOSITE_STATE_IN_PROGRESS; state->stage = FETCHFILE_CONNECT; - c->event_ctx = talloc_reference(c, state->creq->event_ctx); c->private_data = state; return c;