]> git.sur5r.net Git - openldap/commitdiff
Add calls to PERL_SET_CONTEXT, as the active thread might not be the one
authorRalf Haferkamp <ralf@openldap.org>
Tue, 14 Nov 2006 15:18:50 +0000 (15:18 +0000)
committerRalf Haferkamp <ralf@openldap.org>
Tue, 14 Nov 2006 15:18:50 +0000 (15:18 +0000)
that created the PerlInterpreter object (ITS#4751)

servers/slapd/back-perl/add.c
servers/slapd/back-perl/compare.c
servers/slapd/back-perl/delete.c
servers/slapd/back-perl/modify.c
servers/slapd/back-perl/modrdn.c
servers/slapd/back-perl/search.c

index 2e029e4af0b68d15ad7480b21effb238938f24fd..6245bc1e78f90505a5b47f2fa676d9f12bbf2c7a 100644 (file)
@@ -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 );
 
index 43985bbdcad6da564e76d55c015ab138df732e43..d900db5c22edffc07c218aa0c310b4cd99b621ac 100644 (file)
@@ -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 );  
 
        {
index 45dbbcb241c782ee3cc5468460efbef2bcf918e0..87aa499a98a792edea8e6a5a0415e2caaea99508 100644 (file)
@@ -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 );  
 
        {
index 1da13c00f273585d34c94809cc37c8b2e3e0a3b7..b315ee5aa03c1a09c43f7c2083a184a7276fcb11 100644 (file)
@@ -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 );  
 
index 60bff790fd84e117768cf68e1c1981f2fbf6144f..a8f3be5f23a237dcce37d6691def29f2a424c775 100644 (file)
@@ -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 );  
 
        {
index d249825a4be0f9abb19ef04c66ef1ee85ea5bc39..4e8d68a791966e4d2913f3024250fa618ff01507 100644 (file)
@@ -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 );  
 
        {