]> git.sur5r.net Git - openldap/commitdiff
LDAP_SCOPE SUBORDINATE implementation
authorKurt Zeilenga <kurt@openldap.org>
Tue, 30 Dec 2003 01:34:05 +0000 (01:34 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 30 Dec 2003 01:34:05 +0000 (01:34 +0000)
libraries/libldap/request.c
libraries/libldap/url.c

index ba77cc8b0b75319ef9b505c205e122a0e25a5339..6e4985751452703c727fcd9fd8d472c4dbe22b8f 100644 (file)
@@ -1229,7 +1229,9 @@ re_encode_request( LDAP *ld,
                                scope = LDAP_SCOPE_BASE;
                                break;
                        case LDAP_SCOPE_SUBTREE:
+#ifdef LDAP_FEATURE_SUBORDINATE_SCOPE
                        case LDAP_SCOPE_SUBORDINATE:
+#endif
                                scope = LDAP_SCOPE_SUBTREE;
                                break;
                        }
index c5e284bb962f0ccb86df49fbccaa23dbc575c8df..87cfcbc14814f4c93961e3c2307114bf8c470a9c 100644 (file)
@@ -246,11 +246,13 @@ static int str2scope( const char *p )
        } else if ( strcasecmp( p, "subtree" ) == 0 ) {
                return LDAP_SCOPE_SUBTREE;
 
+#ifdef LDAP_FEATURE_SUBORDINATE_SCOPE
        } else if ( strcasecmp( p, "subordinate" ) == 0 ) {
                return LDAP_SCOPE_SUBORDINATE;
 
        } else if ( strcasecmp( p, "children" ) == 0 ) {
                return LDAP_SCOPE_SUBORDINATE;
+#endif
        }
 
        return( -1 );
@@ -350,7 +352,9 @@ char * ldap_url_desc2str( LDAPURLDesc *u )
                case LDAP_SCOPE_BASE:
                case LDAP_SCOPE_ONELEVEL:
                case LDAP_SCOPE_SUBTREE:
+#ifdef LDAP_FEATURE_SUBORDINATE_SCOPE
                case LDAP_SCOPE_SUBORDINATE:
+#endif
                        len += sizeof("subordinate");
                        if( !sep ) sep = 3;
                        break;
@@ -420,10 +424,12 @@ char * ldap_url_desc2str( LDAPURLDesc *u )
                strcpy( &s[sofar], "sub" );
                sofar += sizeof("sub") - 1;
                break;
+#ifdef LDAP_FEATURE_SUBORDINATE_SCOPE
        case LDAP_SCOPE_SUBORDINATE:
                strcpy( &s[sofar], "children" );
                sofar += sizeof("children") - 1;
                break;
+#endif
        }
 
        if( sep < 4 ) goto done;