From d829953dd096f15740b64437c1cb6d6fef359e78 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 18 Jan 2011 20:44:45 +0000 Subject: [PATCH] empty query UUID means negative caching (ITS#6796) --- servers/slapd/overlays/pcache.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c index 04231ae108..68c324d86d 100644 --- a/servers/slapd/overlays/pcache.c +++ b/servers/slapd/overlays/pcache.c @@ -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; -- 2.39.5