complain if instantiated outside of a database definition

This commit is contained in:
Pierangelo Masarati 2006-12-02 10:42:42 +00:00
parent 78af5454d2
commit 19dabd2fa8

View File

@ -2493,6 +2493,13 @@ syncprov_db_init(
slap_overinst *on = (slap_overinst *)be->bd_info;
syncprov_info_t *si;
if ( SLAP_ISGLOBALOVERLAY( be ) ) {
Debug( LDAP_DEBUG_ANY,
"syncprov must be instantiated within a database.\n",
0, 0, 0 );
return 1;
}
si = ch_calloc(1, sizeof(syncprov_info_t));
on->on_bi.bi_private = si;
ldap_pvt_thread_mutex_init( &si->si_csn_mutex );