]> git.sur5r.net Git - openldap/commitdiff
ITS#4358, thanks to Kevine Zerbib
authorQuanah Gibson-Mount <quanah@openldap.org>
Mon, 28 Aug 2006 01:07:25 +0000 (01:07 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Mon, 28 Aug 2006 01:07:25 +0000 (01:07 +0000)
servers/slapd/back-perl/bind.c
servers/slapd/back-perl/init.c
servers/slapd/back-perl/proto-perl.h

index 11d59261fb9c3405c0c3e8be6c98cb779957112b..72e418746e0903360f2518168091e31ab9abe96b 100644 (file)
@@ -32,7 +32,7 @@ perl_back_bind(
 
        PerlBackend *perl_back = (PerlBackend *) op->o_bd->be_private;
 
-#ifdef HAVE_WIN32_ASPERL
+#if defined(HAVE_WIN32_ASPERL) || defined(USE_ITHREADS)
        PERL_SET_CONTEXT( PERL_INTERPRETER );
 #endif
 
index 5a4cd7d0508ce321efc16926781bbc17c064e242..526953a9ad4741b4846d77280cfb4382e3b743fc 100644 (file)
@@ -35,7 +35,9 @@ perl_back_initialize(
        BackendInfo     *bi
 )
 {
-       bi->bi_open = perl_back_open;
+       char *embedding[] = { "", "-e", "0" };
+
+       bi->bi_open = NULL;
        bi->bi_config = 0;
        bi->bi_close = perl_back_close;
        bi->bi_destroy = 0;
@@ -63,16 +65,7 @@ perl_back_initialize(
        bi->bi_connection_init = 0;
        bi->bi_connection_destroy = 0;
 
-       return 0;
-}
-               
-int
-perl_back_open(
-       BackendInfo     *bi
-)
-{
-       char *embedding[] = { "", "-e", "0" };
-
+       /* injecting code from perl_back_open, because using fonction reference  (bi->bi_open) is not functional */
        Debug( LDAP_DEBUG_TRACE, "perl backend open\n", 0, 0, 0 );
 
        if( PERL_INTERPRETER != NULL ) {
index e16c3a81c6d04c27efadb4607ace91ac58429fcf..a2d464ab7a0f338fbd5e987a574ef961af5d97f6 100644 (file)
@@ -22,7 +22,6 @@ LDAP_BEGIN_DECL
 
 extern BI_init         perl_back_initialize;
 
-extern BI_open         perl_back_open;
 extern BI_close                perl_back_close;
 
 extern BI_db_init      perl_back_db_init;