]> git.sur5r.net Git - openldap/commitdiff
fix previous commit: don't loop on undefined; return success with no data in case...
authorPierangelo Masarati <ando@openldap.org>
Thu, 5 May 2005 12:01:12 +0000 (12:01 +0000)
committerPierangelo Masarati <ando@openldap.org>
Thu, 5 May 2005 12:01:12 +0000 (12:01 +0000)
servers/slapd/back-ldap/search.c

index bde4326a9d298daa2b1660c8ad24e73c2940e307..fd57590a139fd9e1e6011ee9ab12e4ae25bc9051 100644 (file)
@@ -93,7 +93,8 @@ munge_filter(
                        }
 
                } else {
-                       continue;
+                       gotit = 0;
+                       goto done;
                }
 
                oldfilter = *filter;
@@ -123,6 +124,7 @@ munge_filter(
                gotit = 1;
        }
 
+done:;
        Debug( LDAP_DEBUG_ARGS, "<= ldap_back_munge_filter \"%s\" (%d)\n",
                        filter->bv_val, gotit, 0 );
 
@@ -227,7 +229,11 @@ fail:;
                        if ( munge_filter( op, &filter ) ) {
                                goto retry;
                        }
-                       /* fallthru */
+
+                       /* invalid filters return success with no data */
+                       rs->sr_err = LDAP_SUCCESS;
+                       rs->sr_text = NULL;
+                       goto finish;
                
                default:
                        rs->sr_err = slap_map_api2result( rs );