]> git.sur5r.net Git - openldap/commitdiff
Update options.c to use new defines.
authorKurt Zeilenga <kurt@openldap.org>
Wed, 4 Nov 1998 20:08:37 +0000 (20:08 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 4 Nov 1998 20:08:37 +0000 (20:08 +0000)
libraries/libldap/options.c

index 2ac502bd84d33b5cf4930d6c6a833eb92b4e59eb..66ccfbd523b233acdd26245d2d238d67bac789c2 100644 (file)
@@ -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;
                        }