/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * 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
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,
#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;
}