r19392: Use torture_setting_* rather than lp_parm_* where possible.
[sfrench/samba-autobuild/.git] / source4 / torture / ldap / cldap.c
index 78bc6063a56b02047d8c667e1675746a99073ddd..321feb639f8b648079982150c0b990d3fe13b778 100644 (file)
@@ -186,6 +186,10 @@ static void cldap_dump_results(struct cldap_search *search)
        struct ldb_ldif ldif;
        struct ldb_context *ldb;
 
+       if (!search || !(search->out.response)) {
+               return;
+       }
+
        /* we need a ldb context to use ldb_ldif_write_file() */
        ldb = ldb_init(NULL);
 
@@ -252,7 +256,7 @@ BOOL torture_cldap(struct torture_context *torture)
 {
        TALLOC_CTX *mem_ctx;
        BOOL ret = True;
-       const char *host = lp_parm_string(-1, "torture", "host");
+       const char *host = torture_setting_string(torture, "host", NULL);
 
        mem_ctx = talloc_init("torture_cldap");