summaryrefslogtreecommitdiffstats
path: root/source4/lib/socket/testsuite.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-06 23:57:22 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:48:37 +0100
commitc5bf20c5fe7eaa04cd11a7ce4f365aa6ffd7b124 (patch)
treea8f2d25736e2edb08fc4b03b21f3a2949b1e2117 /source4/lib/socket/testsuite.c
parent04304808cabd0f05a5ff5bf23d8fd950eff8d6f3 (diff)
downloadsamba-c5bf20c5fe7eaa04cd11a7ce4f365aa6ffd7b124.tar.gz
samba-c5bf20c5fe7eaa04cd11a7ce4f365aa6ffd7b124.tar.xz
samba-c5bf20c5fe7eaa04cd11a7ce4f365aa6ffd7b124.zip
r26325: Remove use of global_loadparm in netif.
(This used to be commit e452cb28594f23add7c00247ed39e8323aea78a6)
Diffstat (limited to 'source4/lib/socket/testsuite.c')
-rw-r--r--source4/lib/socket/testsuite.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source4/lib/socket/testsuite.c b/source4/lib/socket/testsuite.c
index 928469dd82..84132c62b8 100644
--- a/source4/lib/socket/testsuite.c
+++ b/source4/lib/socket/testsuite.c
@@ -48,7 +48,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("127.0.0.1"), 0);
+ iface_best_ip(tctx->lp_ctx, "127.0.0.1"), 0);
torture_assert(tctx, localhost, "Localhost not found");
@@ -56,10 +56,11 @@ static bool test_udp(struct torture_context *tctx)
torture_assert_ntstatus_ok(tctx, status, "listen on socket 1");
srv_addr = socket_get_my_addr(sock1, mem_ctx);
- torture_assert(tctx, srv_addr != NULL && strcmp(srv_addr->addr, iface_best_ip("127.0.0.1")) == 0,
+ torture_assert(tctx, srv_addr != NULL &&
+ strcmp(srv_addr->addr, iface_best_ip(tctx->lp_ctx, "127.0.0.1")) == 0,
talloc_asprintf(tctx,
"Expected server address of %s but got %s",
- iface_best_ip("127.0.0.1"), srv_addr ? srv_addr->addr : NULL));
+ iface_best_ip(tctx->lp_ctx, "127.0.0.1"), srv_addr ? srv_addr->addr : NULL));
torture_comment(tctx, "server port is %d\n", srv_addr->port);
@@ -129,7 +130,7 @@ static bool test_tcp(struct torture_context *tctx)
talloc_steal(mem_ctx, sock2);
localhost = socket_address_from_strings(sock1, sock1->backend_name,
- iface_best_ip("127.0.0.1"), 0);
+ iface_best_ip(tctx->lp_ctx, "127.0.0.1"), 0);
torture_assert(tctx, localhost, "Localhost not found");
status = socket_listen(sock1, localhost, 0, 0);
@@ -139,7 +140,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("127.0.0.1"),
+ torture_assert_str_equal(tctx, srv_addr->addr, iface_best_ip(tctx->lp_ctx, "127.0.0.1"),
"Unexpected server address");
torture_comment(tctx, "server port is %d\n", srv_addr->port);