From: Ralf Haferkamp Date: Tue, 14 Nov 2006 15:18:50 +0000 (+0000) Subject: Add calls to PERL_SET_CONTEXT, as the active thread might not be the one X-Git-Tag: OPENLDAP_REL_ENG_2_4_4ALPHA~8^2~473 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cdb9b2e2aa5491a5d4c70d0c2a851eb55ba11779;p=openldap Add calls to PERL_SET_CONTEXT, as the active thread might not be the one that created the PerlInterpreter object (ITS#4751) --- diff --git a/servers/slapd/back-perl/add.c b/servers/slapd/back-perl/add.c index 2e029e4af0..6245bc1e78 100644 --- a/servers/slapd/back-perl/add.c +++ b/servers/slapd/back-perl/add.c @@ -26,6 +26,9 @@ perl_back_add( int len; int count; +#if defined(HAVE_WIN32_ASPERL) || defined(USE_ITHREADS) + PERL_SET_CONTEXT( PERL_INTERPRETER ); +#endif ldap_pvt_thread_mutex_lock( &perl_interpreter_mutex ); ldap_pvt_thread_mutex_lock( &entry2str_mutex ); diff --git a/servers/slapd/back-perl/compare.c b/servers/slapd/back-perl/compare.c index 43985bbdca..d900db5c22 100644 --- a/servers/slapd/back-perl/compare.c +++ b/servers/slapd/back-perl/compare.c @@ -41,6 +41,9 @@ perl_back_compare( op->orc_ava->aa_desc->ad_cname.bv_val ), "=" ), op->orc_ava->aa_value.bv_val ); +#if defined(HAVE_WIN32_ASPERL) || defined(USE_ITHREADS) + PERL_SET_CONTEXT( PERL_INTERPRETER ); +#endif ldap_pvt_thread_mutex_lock( &perl_interpreter_mutex ); { diff --git a/servers/slapd/back-perl/delete.c b/servers/slapd/back-perl/delete.c index 45dbbcb241..87aa499a98 100644 --- a/servers/slapd/back-perl/delete.c +++ b/servers/slapd/back-perl/delete.c @@ -25,6 +25,9 @@ perl_back_delete( PerlBackend *perl_back = (PerlBackend *) op->o_bd->be_private; int count; +#if defined(HAVE_WIN32_ASPERL) || defined(USE_ITHREADS) + PERL_SET_CONTEXT( PERL_INTERPRETER ); +#endif ldap_pvt_thread_mutex_lock( &perl_interpreter_mutex ); { diff --git a/servers/slapd/back-perl/modify.c b/servers/slapd/back-perl/modify.c index 1da13c00f2..b315ee5aa0 100644 --- a/servers/slapd/back-perl/modify.c +++ b/servers/slapd/back-perl/modify.c @@ -27,6 +27,9 @@ perl_back_modify( int count; int i; +#if defined(HAVE_WIN32_ASPERL) || defined(USE_ITHREADS) + PERL_SET_CONTEXT( PERL_INTERPRETER ); +#endif ldap_pvt_thread_mutex_lock( &perl_interpreter_mutex ); diff --git a/servers/slapd/back-perl/modrdn.c b/servers/slapd/back-perl/modrdn.c index 60bff790fd..a8f3be5f23 100644 --- a/servers/slapd/back-perl/modrdn.c +++ b/servers/slapd/back-perl/modrdn.c @@ -25,6 +25,10 @@ perl_back_modrdn( PerlBackend *perl_back = (PerlBackend *) op->o_bd->be_private; int count; +#if defined(HAVE_WIN32_ASPERL) || defined(USE_ITHREADS) + PERL_SET_CONTEXT( PERL_INTERPRETER ); +#endif + ldap_pvt_thread_mutex_lock( &perl_interpreter_mutex ); { diff --git a/servers/slapd/back-perl/search.c b/servers/slapd/back-perl/search.c index d249825a4b..4e8d68a791 100644 --- a/servers/slapd/back-perl/search.c +++ b/servers/slapd/back-perl/search.c @@ -34,6 +34,9 @@ perl_back_search( char *buf; int i; +#if defined(HAVE_WIN32_ASPERL) || defined(USE_ITHREADS) + PERL_SET_CONTEXT( PERL_INTERPRETER ); +#endif ldap_pvt_thread_mutex_lock( &perl_interpreter_mutex ); {