Commit fe86a81e authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

VLV clean

parent 42ea8ef9
......@@ -899,20 +899,21 @@ main( int argc, char **argv )
c2.ldctl_oid = LDAP_CONTROL_VALUESRETURNFILTER;
c2.ldctl_iscritical = valuesReturnFilter > 1;
if (( ber = ber_alloc_t(LBER_USE_DER)) == NULL )
exit( EXIT_FAILURE );
if (( ber = ber_alloc_t(LBER_USE_DER)) == NULL ) {
return EXIT_FAILURE;
}
if ( err = put_vrFilter(ber, vrFilter)==-1 ) {
if ( err = ldap_put_vrFilter(ber, vrFilter)==-1 ) {
ber_free( ber, 1 );
fprintf( stderr, "Bad ValuesReturnFilter: %s\n", vrFilter );
exit( EXIT_FAILURE );
return EXIT_FAILURE;
}
if ( ber_flatten( ber, &bvalp ) == LBER_ERROR )
return LDAP_NO_MEMORY;
if ( ber_flatten( ber, &bvalp ) == LBER_ERROR ) {
return EXIT_FAILURE;
}
c2.ldctl_value=(*bvalp);
}
err = ldap_set_option( ld, LDAP_OPT_SERVER_CONTROLS, ctrls );
......@@ -925,7 +926,7 @@ main( int argc, char **argv )
(c1.ldctl_iscritical || c2.ldctl_iscritical)
? "critical " : "" );
if( c1.ldctl_iscritical && c2.ldctl_iscritical ) {
exit( EXIT_FAILURE );
return EXIT_FAILURE;
}
}
}
......
......@@ -48,7 +48,6 @@ Update to latest autoconf and friends
Small projects
--------------
Populate matchingRuleUse attribute in the subschema
Implement -E/-e extensions options
Implement -V version options
Implement Proxy Authorization Control extension
Complete Simple Paged Results Control
......
......@@ -1468,6 +1468,10 @@ LDAP_F( LDAPFiltInfo * )
ldap_getnextfilter LDAP_P(( /* deprecated */
LDAPFiltDesc *lfdp ));
LDAP_F( int )
ldap_put_vrFilter LDAP_P((
BerElement *ber,
const char *vrf ));
/*
* in free.c
......@@ -1608,7 +1612,7 @@ ldap_parse_sort_control LDAP_P((
*/
/*
* structure for virtul list.
* structure for virtual list.
*/
typedef struct ldapvlvinfo {
int ldvlv_version;
......
......@@ -808,8 +808,8 @@ put_substring_filter( BerElement *ber, char *type, char *val )
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;
......@@ -847,7 +847,7 @@ ldap_pvt_put_vrFilter( BerElement *ber, const char *str_in )
*/
#ifdef NEW_LOGGING
LDAP_LOG (( "filter", LDAP_LEVEL_ARGS, "ldap_pvt_put_vrFilter: \"%s\"\n",
LDAP_LOG (( "filter", LDAP_LEVEL_ARGS, "put_vrFilter: \"%s\"\n",
str_in ));
#else
Debug( LDAP_DEBUG_TRACE, "put_vrFilter: \"%s\"\n", str_in, 0, 0 );
......@@ -893,7 +893,7 @@ ldap_pvt_put_vrFilter( BerElement *ber, const char *str_in )
default:
#ifdef NEW_LOGGING
LDAP_LOG (( "filter", LDAP_LEVEL_DETAIL1,
"ldap_pvt_put_vrFilter: simple\n" ));
"put_vrFilter: simple\n" ));
#else
Debug( LDAP_DEBUG_TRACE, "put_vrFilter: simple\n",
0, 0, 0 );
......@@ -987,7 +987,7 @@ done:
}
int
put_vrFilter( BerElement *ber, const char *str_in )
ldap_put_vrFilter( BerElement *ber, const char *str_in )
{
int rc =0;
......@@ -995,7 +995,7 @@ put_vrFilter( BerElement *ber, const char *str_in )
rc = -1;
}
rc = ldap_pvt_put_vrFilter( ber, str_in );
rc = put_vrFilter( ber, str_in );
if ( ber_printf( ber, /*"{"*/ "N}" ) == -1 ) {
rc = -1;
......@@ -1031,7 +1031,7 @@ put_vrFilter_list( BerElement *ber, char *str )
/* 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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment