/* $OpenLDAP$ */
/*
- * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
* COPYING RESTRICTIONS APPLY, see COPYRIGHT file
*/
/* Portions
* lessOrEqual [6] AttributeValueAssertion,
* present [7] AttributeType,
* approxMatch [8] AttributeValueAssertion,
- * extensibleMatch [9] MatchingRuleAssertion -- LDAPv3
+ * extensibleMatch [9] MatchingRuleAssertion -- LDAPv3
* }
*
* SubstringFilter ::= SEQUENCE {
* }
* }
*
- * MatchingRuleAssertion ::= SEQUENCE { -- LDAPv3
- * matchingRule [1] MatchingRuleId OPTIONAL,
- * type [2] AttributeDescription OPTIONAL,
- * matchValue [3] AssertionValue,
- * dnAttributes [4] BOOLEAN DEFAULT FALSE }
+ * MatchingRuleAssertion ::= SEQUENCE { -- LDAPv3
+ * matchingRule [1] MatchingRuleId OPTIONAL,
+ * type [2] AttributeDescription OPTIONAL,
+ * matchValue [3] AssertionValue,
+ * dnAttributes [4] BOOLEAN DEFAULT FALSE }
*
* Note: tags in a choice are always explicit
*/
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_ARGS, "ldap_pvt_put_filter: \"%s\"\n",
- str_in ));
+ LDAP_LOG ( FILTER, ARGS, "ldap_pvt_put_filter: \"%s\"\n", str_in,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_filter: \"%s\"\n", str_in, 0, 0 );
#endif
switch ( *str ) {
case '&':
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_DETAIL1,
- "ldap_pvt_put_filter: AND\n" ));
+ LDAP_LOG ( FILTER, DETAIL1, "ldap_pvt_put_filter: AND\n", 0,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_filter: AND\n",
0, 0, 0 );
case '|':
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_DETAIL1,
- "ldap_pvt_put_filter: OR\n" ));
+ LDAP_LOG ( FILTER, DETAIL1, "ldap_pvt_put_filter: OR\n", 0,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_filter: OR\n",
0, 0, 0 );
case '!':
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_DETAIL1,
- "ldap_pvt_put_filter: NOT\n" ));
+ LDAP_LOG ( FILTER, DETAIL1, "ldap_pvt_put_filter: NOT\n", 0,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_filter: NOT\n",
0, 0, 0 );
default:
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_DETAIL1,
- "ldap_pvt_put_filter: simple\n" ));
+ LDAP_LOG ( FILTER, DETAIL1, "ldap_pvt_put_filter: simple\n", 0,0,0);
#else
Debug( LDAP_DEBUG_TRACE, "put_filter: simple\n",
0, 0, 0 );
case /*'('*/ ')':
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_DETAIL1,
- "ldap_pvt_put_filter: end\n" ));
+ LDAP_LOG ( FILTER, DETAIL1, "ldap_pvt_put_filter: end\n", 0,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_filter: end\n",
0, 0, 0 );
default: /* assume it's a simple type=value filter */
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_DETAIL1,
- "ldap_pvt_put_filter: default\n" ));
+ LDAP_LOG ( FILTER, DETAIL1, "ldap_pvt_put_filter: default\n", 0,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_filter: default\n",
0, 0, 0 );
char save;
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_ARGS,
- "put_filter_list \"%s\"\n", str ));
+ LDAP_LOG ( FILTER, ARGS, "put_filter_list \"%s\"\n", str,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_filter_list \"%s\"\n",
str, 0, 0 );
int rc = -1;
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_ARGS,
- "put_simple_filter: \"%s\"\n", str ));
+ LDAP_LOG ( FILTER, ARGS, "put_simple_filter: \"%s\"\n", str,0,0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_simple_filter: \"%s\"\n",
str, 0, 0 );
ber_tag_t ftype = LDAP_FILTER_SUBSTRINGS;
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_ARGS,
- "put_substring_filter \"%s=%s\"\n", type, val ));
+ LDAP_LOG ( FILTER, ARGS, "put_substring_filter \"%s=%s\"\n", type, val, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_substring_filter \"%s=%s\"\n",
type, val, 0 );
return 0;
}
-int
-ldap_pvt_put_vrFilter( BerElement *ber, const char *str_in )
+static int
+put_vrFilter( BerElement *ber, const char *str_in )
{
int rc;
char *freeme;
*/
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_ARGS, "ldap_pvt_put_vrFilter: \"%s\"\n",
- str_in ));
+ LDAP_LOG ( FILTER, ARGS, "put_vrFilter: \"%s\"\n", str_in, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_vrFilter: \"%s\"\n", str_in, 0, 0 );
#endif
default:
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_DETAIL1,
- "ldap_pvt_put_vrFilter: simple\n" ));
+ LDAP_LOG ( FILTER, DETAIL1,
+ "put_vrFilter: simple\n", 0, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_vrFilter: simple\n",
0, 0, 0 );
case /*'('*/ ')':
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_DETAIL1,
- "ldap_pvt_put_filter: end\n" ));
+ LDAP_LOG ( FILTER, DETAIL1, "put_vrFilter: end\n", 0, 0, 0 );
#else
- Debug( LDAP_DEBUG_TRACE, "put_filter: end\n",
+ Debug( LDAP_DEBUG_TRACE, "put_vrFilter: end\n",
0, 0, 0 );
#endif
if ( ber_printf( ber, /*"["*/ "]" ) == -1 ) {
default: /* assume it's a simple type=value filter */
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_DETAIL1,
- "ldap_pvt_put_filter: default\n" ));
+ LDAP_LOG ( FILTER, DETAIL1, "put_vrFilter: default\n",
+ 0, 0, 0 );
#else
- Debug( LDAP_DEBUG_TRACE, "put_filter: default\n",
+ Debug( LDAP_DEBUG_TRACE, "put_vrFilter: default\n",
0, 0, 0 );
#endif
next = strchr( str, '\0' );
}
int
-put_vrFilter( BerElement *ber, const char *str_in )
+ldap_put_vrFilter( BerElement *ber, const char *str_in )
{
int rc =0;
rc = -1;
}
- rc = ldap_pvt_put_vrFilter( ber, str_in );
+ rc = put_vrFilter( ber, str_in );
if ( ber_printf( ber, /*"{"*/ "N}" ) == -1 ) {
rc = -1;
char save;
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_ARGS,
- "put_vrFilter_list \"%s\"\n", str ));
+ LDAP_LOG ( FILTER, ARGS, "put_vrFilter_list \"%s\"\n", str, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_vrFilter_list \"%s\"\n",
str, 0, 0 );
/* now we have "(filter)" with str pointing to it */
*next = '\0';
- if ( ldap_pvt_put_vrFilter( ber, str ) == -1 ) return -1;
+ if ( put_vrFilter( ber, str ) == -1 ) return -1;
*next = save;
str = next;
}
int rc = -1;
#ifdef NEW_LOGGING
- LDAP_LOG (( "filter", LDAP_LEVEL_ARGS,
- "put_simple_vrFilter: \"%s\"\n", str ));
+ LDAP_LOG ( FILTER, ARGS, "put_simple_vrFilter: \"%s\"\n", str, 0, 0 );
#else
Debug( LDAP_DEBUG_TRACE, "put_simple_vrFilter: \"%s\"\n",
str, 0, 0 );