]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/options.c
rename ldap_pvt_init_utils() to ldap_int_utils_init() and provide
[openldap] / libraries / libldap / options.c
index 0ea0ae81bc4f9435643f521df72f2dc58a6966bd..5831264e45d07db164cce13db2c4044eadaa7032 100644 (file)
@@ -231,6 +231,25 @@ ldap_get_option(
 
                return 0;
 
+        case LDAP_OPT_MATCH_STRING:
+               if(ld == NULL) {
+                       /* bad param */
+                       break;
+               } 
+
+               /*
+                * draft-ietf-ldapext-ldap-c-api-01 doesn't require
+                *      the client to have to free error strings, we do
+                */
+
+               if( ld->ld_matched == NULL ) {
+                       * (char **) outvalue = NULL;
+               } else {
+                       * (char **) outvalue = strdup(ld->ld_matched);
+               }
+
+               return 0;
+
        case LDAP_OPT_API_FEATURE_INFO: {
                        LDAPAPIFeatureInfo *info = (LDAPAPIFeatureInfo *) outvalue;
                        int i;
@@ -271,7 +290,7 @@ int
 ldap_set_option(
        LDAP    *ld,
        int             option,
-       void    *invalue)
+       LDAP_CONST void *invalue)
 {
        struct ldapoptions *lo;