diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-08-28 19:03:08 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:03:03 -0500 |
commit | 3e7203d0b34a031e10aeaaf04f246a1de8376ab4 (patch) | |
tree | cb3b6303112f2b945650b2a778d2eb32cbba3e59 /source4/torture/libnet/libnet_lookup.c | |
parent | 53d10b44faa77293e380bd1cda6168acc05a5493 (diff) | |
download | samba-3e7203d0b34a031e10aeaaf04f246a1de8376ab4.tar.gz samba-3e7203d0b34a031e10aeaaf04f246a1de8376ab4.tar.bz2 samba-3e7203d0b34a031e10aeaaf04f246a1de8376ab4.zip |
r24755: Use common code for finding the RPC binding in the torture tests.
(This used to be commit e3310e773924ddd2129e8ca1a86e23d0f713c19c)
Diffstat (limited to 'source4/torture/libnet/libnet_lookup.c')
-rw-r--r-- | source4/torture/libnet/libnet_lookup.c | 9 |
1 files changed, 3 insertions, 6 deletions
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; } |