]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-perl/search.c
Merge remote branch 'origin/mdb.master'
[openldap] / servers / slapd / back-perl / search.c
index 7d7553c244806f832428219d59d8e865c1c7635e..220e89c77987b78ad78d7b5e57880a8a91379051 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1999-2011 The OpenLDAP Foundation.
+ * Copyright 1999-2012 The OpenLDAP Foundation.
  * Portions Copyright 1999 John C. Quillan.
  * Portions Copyright 2002 myinternet Limited.
  * All rights reserved.
@@ -34,9 +34,7 @@ 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 );  
 
        {
@@ -44,16 +42,16 @@ perl_back_search(
 
                PUSHMARK(sp) ;
                XPUSHs( perl_back->pb_obj_ref );
-               XPUSHs(sv_2mortal(newSVpv( op->o_req_ndn.bv_val , 0)));
+               XPUSHs(sv_2mortal(newSVpv( op->o_req_ndn.bv_val , op->o_req_ndn.bv_len)));
                XPUSHs(sv_2mortal(newSViv( op->ors_scope )));
                XPUSHs(sv_2mortal(newSViv( op->ors_deref )));
                XPUSHs(sv_2mortal(newSViv( op->ors_slimit )));
                XPUSHs(sv_2mortal(newSViv( op->ors_tlimit )));
-               XPUSHs(sv_2mortal(newSVpv( op->ors_filterstr.bv_val , 0)));
+               XPUSHs(sv_2mortal(newSVpv( op->ors_filterstr.bv_val , op->ors_filterstr.bv_len)));
                XPUSHs(sv_2mortal(newSViv( op->ors_attrsonly )));
 
                for ( an = op->ors_attrs; an && an->an_name.bv_val; an++ ) {
-                       XPUSHs(sv_2mortal(newSVpv( an->an_name.bv_val , 0)));
+                       XPUSHs(sv_2mortal(newSVpv( an->an_name.bv_val , an->an_name.bv_len)));
                }
                PUTBACK;