From e6e80d00f164e888c119aa1b3ef48e4f120baec6 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 7 May 2005 10:52:05 +0000 Subject: [PATCH] don't leave consts around --- servers/slapd/back-meta/map.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/servers/slapd/back-meta/map.c b/servers/slapd/back-meta/map.c index 29a1ade97f..62533e339f 100644 --- a/servers/slapd/back-meta/map.c +++ b/servers/slapd/back-meta/map.c @@ -539,6 +539,7 @@ ldap_back_filter_map_rewrite( int rc; dncookie fdc; struct berval ftmp; + static char *dmy = ""; rc = ldap_back_int_filter_map_rewrite( dc, f, fstr, remap ); @@ -553,7 +554,7 @@ ldap_back_filter_map_rewrite( fdc.ctx = "searchFilter"; switch ( rewrite_session( fdc.target->mt_rwmap.rwm_rw, fdc.ctx, - ( !BER_BVISEMPTY( &ftmp ) ? ftmp.bv_val : "" ), + ( !BER_BVISEMPTY( &ftmp ) ? ftmp.bv_val : dmy ), fdc.conn, &fstr->bv_val ) ) { case REWRITE_REGEXEC_OK: @@ -586,6 +587,10 @@ ldap_back_filter_map_rewrite( rc = LDAP_OTHER; break; } + + if ( fstr->bv_val == dmy ) { + BER_BVZERO( fstr ); + } #endif /* ENABLE_REWRITE */ return rc; -- 2.39.5