s4:torture: use dcerpc_binding_get_string_option("host") in smbtorture.c
authorStefan Metzmacher <metze@samba.org>
Tue, 4 Feb 2014 11:14:37 +0000 (12:14 +0100)
committerGünther Deschner <gd@samba.org>
Thu, 13 Feb 2014 10:54:17 +0000 (11:54 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source4/torture/smbtorture.c

index fd5315d20ce2e2070b30d6395008e41f4a75fdfa..78f7dade26ec4c26ff71edcda539e2a27aace16e 100644 (file)
@@ -163,9 +163,12 @@ bool torture_parse_target(struct loadparm_context *lp_ctx, const char *target)
                        d_printf("Invalid option: %s is not a valid torture target (share or binding string)\n\n", target);
                        return false;
                }
-               if (binding_struct->host != NULL) {
-                       lpcfg_set_cmdline(lp_ctx, "torture:host", binding_struct->host);
+
+               host = dcerpc_binding_get_string_option(binding_struct, "host");
+               if (host != NULL) {
+                       lpcfg_set_cmdline(lp_ctx, "torture:host", host);
                }
+
                if (lpcfg_parm_string(lp_ctx, NULL, "torture", "share") == NULL)
                        lpcfg_set_cmdline(lp_ctx, "torture:share", "IPC$");
                lpcfg_set_cmdline(lp_ctx, "torture:binding", target);