diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-05-02 15:57:19 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-05-08 12:57:04 +0200 |
commit | 22cb631b4fd0647b70fbaaafaffda8712a84a999 (patch) | |
tree | 3522a34688c42b9698d267a8f0248b2f8c9b9dd4 /source4/lib/socket/testsuite.c | |
parent | 897ef820a40afffbf337b5487a49d957464def67 (diff) | |
download | samba-22cb631b4fd0647b70fbaaafaffda8712a84a999.tar.gz samba-22cb631b4fd0647b70fbaaafaffda8712a84a999.tar.bz2 samba-22cb631b4fd0647b70fbaaafaffda8712a84a999.zip |
s4-interfaces Rename interfaces code so not to conflict with source3/
The iface_count, iface_n_bcast, and load_interfaces functions
conflicted with functions of the same name in source3, so the source4
functions were renamed. Hopefully we can actually wrap one around the
other in future.
Andrew Bartlett
Diffstat (limited to 'source4/lib/socket/testsuite.c')
-rw-r--r-- | source4/lib/socket/testsuite.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source4/lib/socket/testsuite.c b/source4/lib/socket/testsuite.c index 2489277433..518bc72501 100644 --- a/source4/lib/socket/testsuite.c +++ b/source4/lib/socket/testsuite.c @@ -42,7 +42,7 @@ static bool test_udp(struct torture_context *tctx) TALLOC_CTX *mem_ctx = tctx; struct interface *ifaces; - load_interfaces(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces); + load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces); status = socket_create("ip", SOCKET_TYPE_DGRAM, &sock1, 0); torture_assert_ntstatus_ok(tctx, status, "creating DGRAM IP socket 1"); @@ -53,7 +53,7 @@ static bool test_udp(struct torture_context *tctx) talloc_steal(mem_ctx, sock2); localhost = socket_address_from_strings(sock1, sock1->backend_name, - iface_best_ip(ifaces, "127.0.0.1"), 0); + iface_list_best_ip(ifaces, "127.0.0.1"), 0); torture_assert(tctx, localhost, "Localhost not found"); @@ -62,10 +62,10 @@ static bool test_udp(struct torture_context *tctx) srv_addr = socket_get_my_addr(sock1, mem_ctx); torture_assert(tctx, srv_addr != NULL && - strcmp(srv_addr->addr, iface_best_ip(ifaces, "127.0.0.1")) == 0, + strcmp(srv_addr->addr, iface_list_best_ip(ifaces, "127.0.0.1")) == 0, talloc_asprintf(tctx, "Expected server address of %s but got %s", - iface_best_ip(ifaces, "127.0.0.1"), srv_addr ? srv_addr->addr : NULL)); + iface_list_best_ip(ifaces, "127.0.0.1"), srv_addr ? srv_addr->addr : NULL)); torture_comment(tctx, "server port is %d\n", srv_addr->port); @@ -135,9 +135,9 @@ 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_interfaces(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces); + load_interface_list(tctx, lpcfg_interfaces(tctx->lp_ctx), &ifaces); localhost = socket_address_from_strings(sock1, sock1->backend_name, - iface_best_ip(ifaces, "127.0.0.1"), 0); + iface_list_best_ip(ifaces, "127.0.0.1"), 0); torture_assert(tctx, localhost, "Localhost not found"); status = socket_listen(sock1, localhost, 0, 0); @@ -147,7 +147,7 @@ static bool test_tcp(struct torture_context *tctx) torture_assert(tctx, srv_addr && srv_addr->addr, "Unexpected socket_get_my_addr NULL\n"); - torture_assert_str_equal(tctx, srv_addr->addr, iface_best_ip(ifaces, "127.0.0.1"), + torture_assert_str_equal(tctx, srv_addr->addr, iface_list_best_ip(ifaces, "127.0.0.1"), "Unexpected server address"); torture_comment(tctx, "server port is %d\n", srv_addr->port); |