#define ATTR_INT 2
#define ATTR_KV 3
#define ATTR_STRING 4
-#define ATTR_URIS 5
+#define ATTR_OPTION 5
#define ATTR_SASL 6
#define ATTR_TLS 7
offsetof(struct ldapoptions, ldo_defbase)},
{0, ATTR_INT, "PORT", NULL, /* deprecated */
offsetof(struct ldapoptions, ldo_defport)},
- {0, ATTR_URIS, "HOST", NULL, 1}, /* deprecated */
- {0, ATTR_URIS, "URI", NULL, 0}, /* replaces HOST/URI */
+ {0, ATTR_OPTION, "HOST", NULL, LDAP_OPT_HOST_NAME}, /* deprecated */
+ {0, ATTR_OPTION, "URI", NULL, LDAP_OPT_URI}, /* replaces HOST/PORT */
{0, ATTR_BOOL, "REFERRALS", NULL, LDAP_BOOL_REFERRALS},
{0, ATTR_BOOL, "RESTART", NULL, LDAP_BOOL_RESTART},
if (* (char**) p != NULL) LDAP_FREE(* (char**) p);
* (char**) p = LDAP_STRDUP(opt);
break;
- case ATTR_URIS:
- if (attrs[i].offset == 0) {
- ldap_set_option( NULL, LDAP_OPT_URI, opt );
- } else {
- ldap_set_option( NULL, LDAP_OPT_HOST_NAME, opt );
- }
+ case ATTR_OPTION:
+ ldap_set_option( NULL, attrs[i].offset, opt );
break;
case ATTR_SASL:
#ifdef HAVE_CYRUS_SASL
* (char**) p = LDAP_STRDUP(value);
}
break;
- case ATTR_URIS:
- if (attrs[i].offset == 0) {
- ldap_set_option( NULL, LDAP_OPT_URI, value );
- } else {
- ldap_set_option( NULL, LDAP_OPT_HOST_NAME, value );
- }
+ case ATTR_OPTION:
+ ldap_set_option( NULL, attrs[i].offset, value );
break;
case ATTR_SASL:
#ifdef HAVE_CYRUS_SASL