]> git.sur5r.net Git - openldap/commitdiff
empty query UUID means negative caching (ITS#6796)
authorPierangelo Masarati <ando@openldap.org>
Tue, 18 Jan 2011 20:44:45 +0000 (20:44 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 18 Jan 2011 20:44:45 +0000 (20:44 +0000)
servers/slapd/overlays/pcache.c

index 04231ae108eb7c5df24e9e532d4b142db37e6ca0..68c324d86d3e21f958bb498de1d56c2834d2b104 100644 (file)
@@ -674,9 +674,11 @@ url2query(
                        }
 
                        ber_str2bv( &lud->lud_exts[ i ][ STRLENOF( "x-uuid=" ) ], 0, 0, &tmpUUID );
-                       rc = syn_UUID->ssyn_pretty( syn_UUID, &tmpUUID, &uuid, NULL );
-                       if ( rc != LDAP_SUCCESS ) {
-                               goto error;
+                       if ( !BER_BVISEMPTY( &tmpUUID ) ) {
+                               rc = syn_UUID->ssyn_pretty( syn_UUID, &tmpUUID, &uuid, NULL );
+                               if ( rc != LDAP_SUCCESS ) {
+                                       goto error;
+                               }
                        }
                        got |= GOT_UUID;