s4-ipv6: update callers to load_interface_list()
authorAndrew Tridgell <tridge@samba.org>
Thu, 2 Jun 2011 05:40:28 +0000 (15:40 +1000)
committerAndrew Tridgell <tridge@samba.org>
Mon, 6 Jun 2011 02:26:10 +0000 (12:26 +1000)
27 files changed:
libcli/nbt/tools/nmblookup.c
source4/cldap_server/cldap_server.c
source4/cldap_server/netlogon.c
source4/dns_server/dns_server.c
source4/echo_server/echo_server.c
source4/kdc/kdc.c
source4/ldap_server/ldap_server.c
source4/lib/socket/testsuite.c
source4/libcli/resolve/bcast.c
source4/libcli/resolve/wins.c
source4/libcli/wrepl/winsrepl.c
source4/nbt_server/nbt_server.c
source4/nbt_server/wins/wins_ldb.c
source4/nbt_server/wins/winsserver.c
source4/rpc_server/dcerpc_server.c
source4/scripting/python/pyglue.c
source4/smb_server/service_smb.c
source4/smb_server/smb_samba3.c
source4/torture/nbt/dgram.c
source4/torture/nbt/register.c
source4/torture/nbt/wins.c
source4/torture/nbt/winsbench.c
source4/torture/nbt/winsreplication.c
source4/torture/rpc/spoolss_notify.c
source4/web_server/web_server.c
source4/wrepl_server/wrepl_in_connection.c
source4/wrepl_server/wrepl_server.c

index f6117f2fa91c2914d336c802338add8264a25246..9b875b08c49192170fa51d6fcd6671a1156e6ebe 100644 (file)
@@ -357,7 +357,7 @@ int main(int argc, const char *argv[])
                exit(1);
        }
 
-       load_interface_list(NULL, lpcfg_interfaces(cmdline_lp_ctx), &ifaces);
+       load_interface_list(NULL, cmdline_lp_ctx, &ifaces);
 
        ev = s4_event_context_init(talloc_autofree_context());
 
index d5aa9f410f91b710400be026ab09129339550ed7..9370c59df275fee0c19d04a4e92a69e47bf6e5f7 100644 (file)
@@ -189,7 +189,7 @@ static void cldapd_task_init(struct task_server *task)
        NTSTATUS status;
        struct interface *ifaces;
        
-       load_interface_list(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
+       load_interface_list(task, task->lp_ctx, &ifaces);
 
        if (iface_list_count(ifaces) == 0) {
                task_server_terminate(task, "cldapd: no network interfaces configured", false);
index 3f3da8bb4160a8b44d3c110b404d7873ff4c2e26..e950d70ffc252f42a9bbe96716f284604126aa74 100644 (file)
@@ -291,7 +291,7 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context *sam_ctx,
        client_site      = samdb_client_site_name(sam_ctx, mem_ctx,
                                                  src_address, NULL);
        NT_STATUS_HAVE_NO_MEMORY(client_site);
-       load_interface_list(mem_ctx, lpcfg_interfaces(lp_ctx), &ifaces);
+       load_interface_list(mem_ctx, lp_ctx, &ifaces);
        /*
         * TODO: the caller should pass the address which the client
         * used to trigger this call, as the client is able to reach
index 2c0a379fdaba9edda73e717551d3951077fe779e..de8bc125420936cfae7ea9200f0abb6ac0ef4ddc 100644 (file)
@@ -617,7 +617,7 @@ static void dns_task_init(struct task_server *task)
                break;
        }
 
-       load_interface_list(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
+       load_interface_list(task, task->lp_ctx, &ifaces);
 
        if (iface_list_count(ifaces) == 0) {
                task_server_terminate(task, "dns: no network interfaces configured", false);
index 2a4a0bb19a550a5743f43cf8d5b03db6e19193ff..9393a972e276f486d631d41bcb00ff0566c195d7 100644 (file)
@@ -308,7 +308,7 @@ static void echo_task_init(struct task_server *task)
                break;
        }
 
-       load_interface_list(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
+       load_interface_list(task, task->lp_ctx, &ifaces);
 
        if (iface_list_count(ifaces) == 0) {
                task_server_terminate(task,
index 5620c0b2888d192d6ac347aaa77c37be60310c46..7f7782ca9b62479ab99217ec9e7f4944cffc82c0 100644 (file)
@@ -900,7 +900,7 @@ static void kdc_task_init(struct task_server *task)
                break;
        }
 
-       load_interface_list(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
+       load_interface_list(task, task->lp_ctx, &ifaces);
 
        if (iface_list_count(ifaces) == 0) {
                task_server_terminate(task, "kdc: no network interfaces configured", false);
index 755eb441f40be162787b54312d90dc0e98bd8f2a..2d45766b88f443bf78390fc4e2790d080e4a1066 100644 (file)
@@ -951,7 +951,7 @@ static void ldapsrv_task_init(struct task_server *task)
                int num_interfaces;
                int i;
 
-               load_interface_list(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
+               load_interface_list(task, task->lp_ctx, &ifaces);
                num_interfaces = iface_list_count(ifaces);
 
                /* We have been given an interfaces line, and been 
index 518bc72501a61a0f82361e160b7e8065a0a1acc5..357e4ae5df4324efdc2b03bc8f784a104beeff3d 100644 (file)
@@ -42,7 +42,7 @@ static bool test_udp(struct torture_context *tctx)
        TALLOC_CTX *mem_ctx = tctx;
        struct interface *ifaces;
 
-       load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
+       load_interface_list(tctx, tctx->lp_ctx, &ifaces);
 
        status = socket_create("ip", SOCKET_TYPE_DGRAM, &sock1, 0);
        torture_assert_ntstatus_ok(tctx, status, "creating DGRAM IP socket 1");
@@ -135,7 +135,7 @@ static bool test_tcp(struct torture_context *tctx)
        torture_assert_ntstatus_ok(tctx, status, "creating IP stream socket 1");
        talloc_steal(mem_ctx, sock2);
 
-       load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
+       load_interface_list(tctx, tctx->lp_ctx, &ifaces);
        localhost = socket_address_from_strings(sock1, sock1->backend_name, 
                                                iface_list_best_ip(ifaces, "127.0.0.1"), 0);
        torture_assert(tctx, localhost, "Localhost not found");
index 794ef34e202eac176aabfd8d51f4928aa2d0b16a..150705f8d8f0335ccce5383ecbceca29f3b28ae1 100644 (file)
@@ -101,6 +101,6 @@ bool resolve_context_add_bcast_method(struct resolve_context *ctx, struct interf
 bool resolve_context_add_bcast_method_lp(struct resolve_context *ctx, struct loadparm_context *lp_ctx)
 {
        struct interface *ifaces;
-       load_interface_list(ctx, lpcfg_interfaces(lp_ctx), &ifaces);
+       load_interface_list(ctx, lp_ctx, &ifaces);
        return resolve_context_add_bcast_method(ctx, ifaces, lpcfg_nbt_port(lp_ctx), lpcfg_parm_int(lp_ctx, NULL, "nbt", "timeout", 1));
 }
index 914386ce9c3cec3f3c3ea121e177d45960f57ef5..a52b99a23ef30ebecc080a682c93b676db1fb6c0 100644 (file)
@@ -77,6 +77,6 @@ bool resolve_context_add_wins_method(struct resolve_context *ctx, const char **a
 bool resolve_context_add_wins_method_lp(struct resolve_context *ctx, struct loadparm_context *lp_ctx)
 {
        struct interface *ifaces;
-       load_interface_list(ctx, lpcfg_interfaces(lp_ctx), &ifaces);
+       load_interface_list(ctx, lp_ctx, &ifaces);
        return resolve_context_add_wins_method(ctx, lpcfg_wins_server_list(lp_ctx), ifaces, lpcfg_nbt_port(lp_ctx), lpcfg_parm_int(lp_ctx, NULL, "nbt", "timeout", 1));
 }
index 2ccc50e71e5b8c8076a4b52ae1e36be37d461ae9..0dee2c56cf32f5fa7c80e92ef732e4d0119d0155 100644 (file)
@@ -136,7 +136,7 @@ NTSTATUS wrepl_socket_split_stream(struct wrepl_socket *wrepl_socket,
 const char *wrepl_best_ip(struct loadparm_context *lp_ctx, const char *peer_ip)
 {
        struct interface *ifaces;
-       load_interface_list(lp_ctx, lpcfg_interfaces(lp_ctx), &ifaces);
+       load_interface_list(lp_ctx, lp_ctx, &ifaces);
        return iface_list_best_ip(ifaces, peer_ip);
 }
 
index 3274fdd99d8e36458ec5321a91b5877a3579cf90..175ad5e4a43a3ebbc21e02eecbb7aecde76d7259 100644 (file)
@@ -41,7 +41,7 @@ static void nbtd_task_init(struct task_server *task)
        NTSTATUS status;
        struct interface *ifaces;
 
-       load_interface_list(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
+       load_interface_list(task, task->lp_ctx, &ifaces);
 
        if (iface_list_count(ifaces) == 0) {
                task_server_terminate(task, "nbtd: no network interfaces configured", false);
index ae90d04c76d9b1994136c2b56e61925f28d87696..6519f9e7f7d303c190778b909b92c669f68ab1fa 100644 (file)
@@ -92,7 +92,7 @@ static int wins_ldb_init(struct ldb_module *module)
        owner = lpcfg_parm_string(lp_ctx, NULL, "winsdb", "local_owner");
        if (!owner) {
                struct interface *ifaces;
-               load_interface_list(module, lpcfg_interfaces(lp_ctx), &ifaces);
+               load_interface_list(module, lp_ctx, &ifaces);
                owner = iface_list_n_ip(ifaces, 0);
                if (!owner) {
                        owner = "0.0.0.0";
index c58cb2709ab2ca831e27d6b87245e2b1e2ebcc0f..604c86ea5d67890cfd4218dbc13ed30b89aaf7e6 100644 (file)
@@ -1057,7 +1057,7 @@ NTSTATUS nbtd_winsserver_init(struct nbtd_server *nbtsrv)
 
        if (owner == NULL) {
                struct interface *ifaces;
-               load_interface_list(nbtsrv->task, lpcfg_interfaces(nbtsrv->task->lp_ctx), &ifaces);
+               load_interface_list(nbtsrv->task, nbtsrv->task->lp_ctx, &ifaces);
                owner = iface_list_n_ip(ifaces, 0);
        }
 
index 01ce9891254ad20b6436da2cbb5336e293d5f3e0..394a3511c2f024538bb943d7f1ba2d2422a6a22d 100644 (file)
@@ -1678,7 +1678,7 @@ static NTSTATUS dcesrv_add_ep_tcp(struct dcesrv_context *dce_ctx,
                int i;
                struct interface *ifaces;
 
-               load_interface_list(dce_ctx, lpcfg_interfaces(lp_ctx), &ifaces);
+               load_interface_list(dce_ctx, lp_ctx, &ifaces);
 
                num_interfaces = iface_list_count(ifaces);
                for(i = 0; i < num_interfaces; i++) {
index 0f2048aa894da3a4b99c8a95e0136a3a617b8394..8a82f3502a52edc53e1b90a790244b972995cf65 100644 (file)
@@ -153,7 +153,7 @@ static PyObject *py_interface_ips(PyObject *self, PyObject *args)
                return NULL;
        }
 
-       load_interface_list(tmp_ctx, lpcfg_interfaces(lp_ctx), &ifaces);
+       load_interface_list(tmp_ctx, lp_ctx, &ifaces);
 
        count = iface_list_count(ifaces);
 
index d2833d9be60204a7410ff4936ac39495e667df5e..7e50318424860e17aa3c420827b87e0de1564d85 100644 (file)
@@ -48,7 +48,7 @@ static void smbsrv_task_init(struct task_server *task)
                int i;
                struct interface *ifaces;
 
-               load_interface_list(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
+               load_interface_list(task, task->lp_ctx, &ifaces);
 
                num_interfaces = iface_list_count(ifaces);
 
index 35630ade0534114220e7b5d769f5813a6e29b28f..1a99be644a8be31d96c97a6460da8c6df5eead59 100644 (file)
@@ -135,7 +135,7 @@ static void samba3_smb_task_init(struct task_server *task)
                int i;
                struct interface *ifaces;
 
-               load_interface_list(task, lpcfg_interfaces(task->lp_ctx), &ifaces);
+               load_interface_list(task, task->lp_ctx, &ifaces);
 
                num_interfaces = iface_list_count(ifaces);
 
index b33afec68f6741582813525c5edbc5a34e05cf02..aa4759edaf98f9185815413fb5f831dba6a6ecca 100644 (file)
@@ -91,7 +91,7 @@ static bool nbt_test_netlogon(struct torture_context *tctx)
                                                   &name, tctx, &address, tctx->ev),
                                   talloc_asprintf(tctx, "Failed to resolve %s", name.name));
 
-       load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
+       load_interface_list(tctx, tctx->lp_ctx, &ifaces);
        myaddress = talloc_strdup(dgmsock, iface_list_best_ip(ifaces, address));
 
 
@@ -187,7 +187,7 @@ static bool nbt_test_netlogon2(struct torture_context *tctx)
                                                   &name, tctx, &address, tctx->ev),
                                   talloc_asprintf(tctx, "Failed to resolve %s", name.name));
 
-       load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
+       load_interface_list(tctx, tctx->lp_ctx, &ifaces);
        myaddress = talloc_strdup(dgmsock, iface_list_best_ip(ifaces, address));
 
        socket_address = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
@@ -458,7 +458,7 @@ static bool nbt_test_ntlogon(struct torture_context *tctx)
                                                   0, 0, &name, tctx, &address, tctx->ev),
                                   talloc_asprintf(tctx, "Failed to resolve %s", name.name));
 
-       load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
+       load_interface_list(tctx, tctx->lp_ctx, &ifaces);
        myaddress = talloc_strdup(dgmsock, iface_list_best_ip(ifaces, address));
 
        socket_address = socket_address_from_strings(dgmsock, dgmsock->sock->backend_name,
index 8405d91c184e1ea587e65f769ed8257cc09d6f63..24ca328b30fe09e0482a603a75af6f3abbea0f10 100644 (file)
@@ -54,7 +54,7 @@ static bool nbt_register_own(struct torture_context *tctx)
        if (!torture_nbt_get_name(tctx, &name, &address))
                return false;
 
-       load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
+       load_interface_list(tctx, tctx->lp_ctx, &ifaces);
 
        myaddress = iface_list_best_ip(ifaces, address);
 
@@ -123,7 +123,7 @@ static bool nbt_refresh_own(struct torture_context *tctx)
        if (!torture_nbt_get_name(tctx, &name, &address))
                return false;
        
-       load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
+       load_interface_list(tctx, tctx->lp_ctx, &ifaces);
 
        myaddress = iface_list_best_ip(ifaces, address);
 
index 635683ffbf9d1cc75d63947ce87e8745eaf4e94a..571249f562dfd2fdce418e389358838c3359694d 100644 (file)
@@ -65,7 +65,7 @@ static bool nbt_test_wins_name(struct torture_context *tctx, const char *address
        struct interface *ifaces;
        bool low_port = try_low_port;
 
-       load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
+       load_interface_list(tctx, tctx->lp_ctx, &ifaces);
 
        myaddress = talloc_strdup(tctx, iface_list_best_ip(ifaces, address));
 
index 07c7e952cba6bcc6ecae532db4b7387b25457b76..cb71d8755dd710d8036a35316c801efa21877e29 100644 (file)
@@ -246,7 +246,7 @@ static bool bench_wins(struct torture_context *tctx)
        state->registered = talloc_zero_array(state, bool, state->num_names);
        state->wins_server = address;
        state->wins_port = lpcfg_nbt_port(tctx->lp_ctx);
-       load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
+       load_interface_list(tctx, tctx->lp_ctx, &ifaces);
        state->my_ip = talloc_strdup(tctx, iface_list_best_ip(ifaces, address));
        state->ttl = timelimit;
 
index 40f7ac33ea0adb45f23115cc5fa4a35022142931..7165f10dbbbbcc5e86e9fb3d3eb86bf0462b1478 100644 (file)
@@ -615,7 +615,7 @@ static struct test_wrepl_conflict_conn *test_create_conflict_ctx(
        ctx->nbtsock = nbt_name_socket_init(ctx, tctx->ev);
        if (!ctx->nbtsock) return NULL;
 
-       load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
+       load_interface_list(tctx, tctx->lp_ctx, &ifaces);
 
        ctx->myaddr = socket_address_from_strings(tctx, ctx->nbtsock->sock->backend_name, iface_list_best_ip(ifaces, address), 0);
        if (!ctx->myaddr) return NULL;
index 04cd01b4a324f3d95e5a4aa0e577950d352a60cf..cfb67716df19d1768539256755295c9adb10e736 100644 (file)
@@ -455,7 +455,7 @@ static bool test_start_dcerpc_server(struct torture_context *tctx,
 
        lpcfg_set_cmdline(tctx->lp_ctx, "dcerpc endpoint servers", "spoolss");
 
-       load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces);
+       load_interface_list(tctx, tctx->lp_ctx, &ifaces);
        address = iface_list_n_ip(ifaces, 0);
 
        torture_comment(tctx, "Listening for callbacks on %s\n", address);
index c79f69a0e29f388e37524ceae57e6775787e1d34..cdf6f9b7d0ecd3c67f3ed871385ed62138b8c0b0 100644 (file)
@@ -319,7 +319,7 @@ static void websrv_task_init(struct task_server *task)
                int i;
                struct interface *ifaces;
 
-               load_interface_list(NULL, lpcfg_interfaces(task->lp_ctx), &ifaces);
+               load_interface_list(NULL, task->lp_ctx, &ifaces);
 
                num_interfaces = iface_list_count(ifaces);
                for(i = 0; i < num_interfaces; i++) {
index 0837d0097f28b1ed183ccd0553f25f76abc2f793..9eaf10f52c9148e593456e23a0d5023cf0e5397b 100644 (file)
@@ -441,7 +441,7 @@ NTSTATUS wreplsrv_setup_sockets(struct wreplsrv_service *service, struct loadpar
                int i;
                struct interface *ifaces;
 
-               load_interface_list(task, lpcfg_interfaces(lp_ctx), &ifaces);
+               load_interface_list(task, lp_ctx, &ifaces);
 
                num_interfaces = iface_list_count(ifaces);
 
index 45cf8a94d2c2a5aff69cffc921df35be9aba0d45..7b420e3d91446a0c3c5d07210949c7dbffef32bb 100644 (file)
@@ -78,7 +78,7 @@ static NTSTATUS wreplsrv_open_winsdb(struct wreplsrv_service *service,
 
        if (owner == NULL) {
                struct interface *ifaces;
-               load_interface_list(service, lpcfg_interfaces(lp_ctx), &ifaces);
+               load_interface_list(service, lp_ctx, &ifaces);
                owner = iface_list_n_ip(ifaces, 0);
        }