From: Quanah Gibson-Mount Date: Mon, 28 Aug 2006 01:07:25 +0000 (+0000) Subject: ITS#4358, thanks to Kevine Zerbib X-Git-Tag: OPENLDAP_REL_ENG_2_3_MP~250 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=761b0a239dfe6729e75c803e9368f2636807672f;p=openldap ITS#4358, thanks to Kevine Zerbib --- diff --git a/servers/slapd/back-perl/bind.c b/servers/slapd/back-perl/bind.c index 11d59261fb..72e418746e 100644 --- a/servers/slapd/back-perl/bind.c +++ b/servers/slapd/back-perl/bind.c @@ -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 diff --git a/servers/slapd/back-perl/init.c b/servers/slapd/back-perl/init.c index 5a4cd7d050..526953a9ad 100644 --- a/servers/slapd/back-perl/init.c +++ b/servers/slapd/back-perl/init.c @@ -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 ) { diff --git a/servers/slapd/back-perl/proto-perl.h b/servers/slapd/back-perl/proto-perl.h index e16c3a81c6..a2d464ab7a 100644 --- a/servers/slapd/back-perl/proto-perl.h +++ b/servers/slapd/back-perl/proto-perl.h @@ -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;