]> git.sur5r.net Git - openldap/commitdiff
VLV clean OPENLDAP_REL_ENG_2_MP
authorKurt Zeilenga <kurt@openldap.org>
Sun, 9 Jun 2002 06:12:24 +0000 (06:12 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sun, 9 Jun 2002 06:12:24 +0000 (06:12 +0000)
clients/tools/ldapsearch.c
doc/devel/todo
include/ldap.h
libraries/libldap/filter.c

index 868ac0697fa3f53b1929dba8ff4925b2633d2f9b..1ab31acdaa4a98c452ab7fa08dff267495c745a4 100644 (file)
@@ -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;
                        }
                }
        }
index a051b7b0ae081d3a3ebccbb3903370d2c0b7da56..2c60ebf1c0a796fdd30e5526023658893b312c43 100644 (file)
@@ -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
index e60b453d5d895221db4e565efc75bf032d359ef6..7430690d2a2c268ed707faeb41144921e052eeb8 100644 (file)
@@ -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;
index 7d40d1ceb472588ee886da4c89df09f19c7a18b5..93a45cd75aa9f6507cb010a07152e314ffb83b0e 100644 (file)
@@ -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;
        }