From 3e7203d0b34a031e10aeaaf04f246a1de8376ab4 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 28 Aug 2007 19:03:08 +0000 Subject: r24755: Use common code for finding the RPC binding in the torture tests. (This used to be commit e3310e773924ddd2129e8ca1a86e23d0f713c19c) --- source4/torture/libnet/libnet_lookup.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'source4/torture/libnet/libnet_lookup.c') diff --git a/source4/torture/libnet/libnet_lookup.c b/source4/torture/libnet/libnet_lookup.c index d4251bbdee..b48f7e7bac 100644 --- a/source4/torture/libnet/libnet_lookup.c +++ b/source4/torture/libnet/libnet_lookup.c @@ -24,6 +24,7 @@ #include "librpc/gen_ndr/nbt.h" #include "librpc/rpc/dcerpc.h" #include "libcli/libcli.h" +#include "torture/rpc/rpc.h" #include "torture/torture.h" @@ -35,7 +36,6 @@ BOOL torture_lookup(struct torture_context *torture) struct libnet_context *ctx; struct libnet_Lookup lookup; struct dcerpc_binding *bind; - const char *bindstr; mem_ctx = talloc_init("test_lookup"); @@ -44,8 +44,7 @@ BOOL torture_lookup(struct torture_context *torture) lookup.in.hostname = torture_setting_string(torture, "host", NULL); if (lookup.in.hostname == NULL) { - bindstr = torture_setting_string(torture, "binding", NULL); - status = dcerpc_parse_binding(mem_ctx, bindstr, &bind); + status = torture_rpc_binding(torture, &bind); if (NT_STATUS_IS_OK(status)) { lookup.in.hostname = bind->host; } @@ -81,7 +80,6 @@ BOOL torture_lookup_host(struct torture_context *torture) struct libnet_context *ctx; struct libnet_Lookup lookup; struct dcerpc_binding *bind; - const char *bindstr; mem_ctx = talloc_init("test_lookup_host"); @@ -90,8 +88,7 @@ BOOL torture_lookup_host(struct torture_context *torture) lookup.in.hostname = torture_setting_string(torture, "host", NULL); if (lookup.in.hostname == NULL) { - bindstr = torture_setting_string(torture, "binding", NULL); - status = dcerpc_parse_binding(mem_ctx, bindstr, &bind); + status = torture_rpc_binding(torture, &bind); if (NT_STATUS_IS_OK(status)) { lookup.in.hostname = bind->host; } -- cgit