Remove yet more uses of global_loadparm.
[jelmer/samba4-debian.git] / source / torture / ldap / cldapbench.c
index 21fe3849b13bf3931f6001e70b7b9e92b3737cb2..83e505e164ee0210b607d0304f17c6fe95e757ac 100644 (file)
@@ -51,7 +51,7 @@ static void request_handler(struct cldap_request *req)
 */
 static bool bench_cldap(struct torture_context *tctx, const char *address)
 {
-       struct cldap_socket *cldap = cldap_socket_init(tctx, NULL);
+       struct cldap_socket *cldap = cldap_socket_init(tctx, NULL, lp_iconv_convenience(tctx->lp_ctx));
        int num_sent=0;
        struct timeval tv = timeval_current();
        bool ret = true;
@@ -63,6 +63,7 @@ static bool bench_cldap(struct torture_context *tctx, const char *address)
 
        ZERO_STRUCT(search);
        search.in.dest_address = address;
+       search.in.dest_port     = lp_cldap_port(tctx->lp_ctx);
        search.in.acct_control = -1;
        search.in.version = 6;
 
@@ -115,7 +116,7 @@ bool torture_bench_cldap(struct torture_context *torture)
        make_nbt_name_server(&name, torture_setting_string(torture, "host", NULL));
 
        /* do an initial name resolution to find its IP */
-       status = resolve_name(&name, torture, &address, event_context_find(torture), lp_name_resolve_order(torture->lp_ctx));
+       status = resolve_name(lp_resolve_context(torture->lp_ctx), &name, torture, &address, event_context_find(torture));
        if (!NT_STATUS_IS_OK(status)) {
                printf("Failed to resolve %s - %s\n",
                       name.name, nt_errstr(status));