From: Hallvard Furuseth Date: Mon, 8 Mar 1999 03:05:26 +0000 (+0000) Subject: Use ldap__option instead of poking into the LDAP structure X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~445 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=dc165a16b92d6e814c508526f39c6595fec94502;p=openldap Use ldap__option instead of poking into the LDAP structure --- diff --git a/contrib/saucer/main.c b/contrib/saucer/main.c index 3e21106953..4028904dfd 100644 --- a/contrib/saucer/main.c +++ b/contrib/saucer/main.c @@ -322,20 +322,22 @@ int cmd_set(char **cmdargv, int cmdargc) case 0: if ((++i < cmdargc) && (j = table_lookup(cmdargv[i], alias_opts, sizeof(alias_opts) / sizeof(alias_opts[0]))) >= 0) - ld->ld_deref = j; + ldap_set_option(ld, LDAP_OPT_DEREF, &j); else errflag = 1; break; case 1: - if (++i < cmdargc) - ld->ld_sizelimit = atoi(cmdargv[i]); - else + if (++i < cmdargc) { + j = atoi(cmdargv[i]); + ldap_set_option(ld, LDAP_OPT_SIZELIMIT, &j); + } else errflag = 1; break; case 2: - if (++i < cmdargc) - ld->ld_timelimit = atoi(cmdargv[i]); - else + if (++i < cmdargc) { + j = atoi(cmdargv[i]); + ldap_set_option(ld, LDAP_OPT_TIMELIMIT, &j); + } else errflag = 1; break; default: @@ -347,11 +349,16 @@ int cmd_set(char **cmdargv, int cmdargc) if (errflag) show_syntax(CMD_SET); - else + else { + int opt_a, opt_s, opt_t; + ldap_get_option(ld, LDAP_OPT_DEREF, &opt_a); + ldap_get_option(ld, LDAP_OPT_SIZELIMIT, &opt_s); + ldap_get_option(ld, LDAP_OPT_TIMELIMIT, &opt_t); printf("Alias dereferencing is %s, Sizelimit is %d entr%s, Timelimit is %d second%s.\n", - alias_opts[ld->ld_deref], - ld->ld_sizelimit, ld->ld_sizelimit == 1 ? "y" : "ies", - ld->ld_timelimit, ld->ld_timelimit == 1 ? "" : "s"); + alias_opts[opt_a], + opt_s, opt_s == 1 ? "y" : "ies", + opt_t, opt_t == 1 ? "" : "s"); + } return 0; }