return 0;
options:
- if( !LDAP_LDH( str[i] )) {
+ if( !LDAP_LDH( str[0] )) {
return 0;
}
for( i=1; str[i]; i++ ) {
case '<':
ftype = LDAP_FILTER_LE;
*s = '\0';
- if(! ldap_is_desc( str ) ) goto done;
break;
case '>':
ftype = LDAP_FILTER_GE;
*s = '\0';
- if(! ldap_is_desc( str ) ) goto done;
break;
case '~':
ftype = LDAP_FILTER_APPROX;
*s = '\0';
- if(! ldap_is_desc( str ) ) goto done;
break;
case ':':
char *dn = strchr( str, ':' );
char *rule = NULL;
- if( dn == NULL ) {
- if(! ldap_is_desc( str ) ) goto done;
-
- } else {
-
+ if( dn != NULL ) {
*dn++ = '\0';
rule = strchr( dn, ':' );
} break;
}
+ if( !ldap_is_desc( str ) ) goto done;
+
if ( ftype == LDAP_FILTER_PRESENT ) {
rc = ber_printf( ber, "ts", ftype, str );