X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=contrib%2Fslapd-modules%2Fnoopsrch%2Fnoopsrch.c;h=d659f3097aac836980f56b1934219b1c8658c104;hb=0fd1bf30b8f6d2b7ef0bef287044b6fb8907fb4f;hp=f6d5256a42b85a580352b00754ded028da93d81b;hpb=c8c34cdd43d3603f3b64a56841b4425379c98f45;p=openldap diff --git a/contrib/slapd-modules/noopsrch/noopsrch.c b/contrib/slapd-modules/noopsrch/noopsrch.c index f6d5256a42..d659f3097a 100644 --- a/contrib/slapd-modules/noopsrch/noopsrch.c +++ b/contrib/slapd-modules/noopsrch/noopsrch.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 2010-2011 The OpenLDAP Foundation. + * Copyright 2010-2013 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -199,7 +199,7 @@ noopsrch_db_init( BackendDB *be, ConfigReply *cr) int rc; rc = register_supported_control( LDAP_CONTROL_X_NOOPSRCH, - SLAP_CTRL_SEARCH, NULL, + SLAP_CTRL_SEARCH | SLAP_CTRL_GLOBAL_SEARCH, NULL, noopsrch_parseCtrl, &noopsrch_cid ); if ( rc != LDAP_SUCCESS ) { Debug( LDAP_DEBUG_ANY, @@ -219,12 +219,12 @@ noopsrch_db_destroy( BackendDB *be, ConfigReply *cr ) #ifdef SLAP_CONFIG_DELETE overlay_unregister_control( be, LDAP_CONTROL_X_NOOPSRCH ); -#endif /* SLAP_CONFIG_DELETE */ - if ( --noopsrch_cnt == 0 ) { unregister_supported_control( LDAP_CONTROL_X_NOOPSRCH ); } +#endif /* SLAP_CONFIG_DELETE */ + return 0; }