r7813: Make async request independent from config file routines.
authorRafal Szczesniak <mimir@samba.org>
Tue, 21 Jun 2005 20:18:08 +0000 (20:18 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:18:38 +0000 (13:18 -0500)
rafal

source/libcli/resolve/resolve.c

index 0b7c359ca15151bcb6bb9b196a2ef246ef3c4395..b87f9abe892d9fae352b9841774d6b929545b185 100644 (file)
@@ -132,16 +132,8 @@ struct composite_context *resolve_name_send(struct nbt_name *name, struct event_
        status = nbt_name_dup(state, name, &state->name);
        if (!NT_STATUS_IS_OK(status)) goto failed;
 
-       /* use default methods from config file if not passed explicitly */
-       if (methods == NULL) {
-               state->methods = lp_name_resolve_order();
-               if (state->methods == NULL) {
-                       return NULL;
-               }
-
-       } else {
-               state->methods = methods;
-       }
+       if (methods == NULL) goto failed;
+       state->methods = methods;
 
        c->state = SMBCLI_REQUEST_SEND;
        c->private = state;
@@ -186,7 +178,7 @@ NTSTATUS resolve_name_recv(struct composite_context *c,
  */
 NTSTATUS resolve_name(struct nbt_name *name, TALLOC_CTX *mem_ctx, const char **reply_addr)
 {
-       struct composite_context *c = resolve_name_send(name, NULL, NULL);
+       struct composite_context *c = resolve_name_send(name, NULL, lp_name_resolve_order());
        return resolve_name_recv(c, mem_ctx, reply_addr);
 }