r7748: Use state structure in connection with io to get returned address.
authorRafal Szczesniak <mimir@samba.org>
Sun, 19 Jun 2005 09:35:02 +0000 (09:35 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:18:30 +0000 (13:18 -0500)
rafal
(This used to be commit 345a71a08e74ddf959680615d51488f8e989cba1)

source4/libnet/libnet_lookup.c

index c6dc6d07417c3d7aadca8a3b16d782e9cabbefc6..c517213652a36fa0fb26cb31ab2a9d438adf437d 100644 (file)
@@ -35,7 +35,7 @@
 struct lookup_state {
        struct composite_context *resolve_ctx;
        struct nbt_name hostname;
-       char address[16];
+       const char **address;
 };
 
 
@@ -61,6 +61,7 @@ struct composite_context *libnet_Lookup_send(struct libnet_Lookup *io)
        s->hostname.name   = talloc_strdup(s, io->in.hostname);
        s->hostname.type   = io->in.type;
        s->hostname.scope  = NULL;
+       s->address         = io->out.address;
 
        c->private  = s;
        c->state    = SMBCLI_REQUEST_SEND;
@@ -84,7 +85,7 @@ NTSTATUS libnet_Lookup_recv(struct composite_context *c, TALLOC_CTX *mem_ctx,
 
        s = talloc_get_type(c->private, struct lookup_state);
 
-       status = resolve_name_recv(s->resolve_ctx, mem_ctx, io->out.address);
+       status = resolve_name_recv(s->resolve_ctx, mem_ctx, s->address);
        return status;
 }