From ba47ae1c6d42055d09441d742f51e051fab43714 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Wed, 4 Nov 1998 20:08:37 +0000 Subject: [PATCH] Update options.c to use new defines. --- libraries/libldap/options.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libraries/libldap/options.c b/libraries/libldap/options.c index 2ac502bd84..66ccfbd523 100644 --- a/libraries/libldap/options.c +++ b/libraries/libldap/options.c @@ -40,15 +40,17 @@ ldap_get_option( return -1; } - if(info->ldapai_info_version != 1) { - /* version mismatch */ + if(info->ldapai_info_version != LDAP_API_INFO_VERSION) { + /* api info version mismatch */ + info->ldapai_info_version = LDAP_API_INFO_VERSION; return -1; } + info->ldapai_api_version = LDAP_API_VERSION; info->ldapai_api_version = LDAP_API_VERSION; info->ldapai_protocol_version = LDAP_VERSION_MAX; info->ldapai_extensions = NULL; - info->ldapai_vendor_name = strdup(LDAP_VENDOR); + info->ldapai_vendor_name = strdup(LDAP_VENDOR_NAME); info->ldapai_vendor_version = LDAP_VENDOR_VERSION; return 0; @@ -175,7 +177,7 @@ ldap_set_option( case LDAP_OPT_PROTOCOL_VERSION: { int vers = * (int *) invalue; - if (vers > LDAP_VERSION_MAX) { + if (vers < LDAP_VERSION_MIN || vers > LDAP_VERSION_MAX) { /* not supported */ break; } -- 2.39.5