PUSHMARK(sp);
XPUSHs( perl_back->pb_obj_ref );
- XPUSHs(sv_2mortal(newSVpv( entry2str( op->ora_e, &len ), 0 )));
+ XPUSHs(sv_2mortal(newSVpv( entry2str( op->ora_e, &len ), len )));
PUTBACK;
PUSHMARK(SP);
XPUSHs( perl_back->pb_obj_ref );
- XPUSHs(sv_2mortal(newSVpv( op->o_req_dn.bv_val , 0)));
+ XPUSHs(sv_2mortal(newSVpv( op->o_req_dn.bv_val , op->o_req_dn.bv_len)));
XPUSHs(sv_2mortal(newSVpv( op->orb_cred.bv_val , op->orb_cred.bv_len)));
PUTBACK;
Operation *op,
SlapReply *rs )
{
- int count;
+ int count, avalen;
char *avastr;
PerlBackend *perl_back = (PerlBackend *)op->o_bd->be_private;
- avastr = ch_malloc( op->orc_ava->aa_desc->ad_cname.bv_len + 1 +
- op->orc_ava->aa_value.bv_len + 1 );
-
+ avalen = op->orc_ava->aa_desc->ad_cname.bv_len + 1 +
+ op->orc_ava->aa_value.bv_len;
+ avastr = ch_malloc( avalen + 1 );
+
lutil_strcopy( lutil_strcopy( lutil_strcopy( avastr,
op->orc_ava->aa_desc->ad_cname.bv_val ), "=" ),
op->orc_ava->aa_value.bv_val );
PUSHMARK(sp);
XPUSHs( perl_back->pb_obj_ref );
- XPUSHs(sv_2mortal(newSVpv( op->o_req_dn.bv_val , 0)));
- XPUSHs(sv_2mortal(newSVpv( avastr , 0)));
+ XPUSHs(sv_2mortal(newSVpv( op->o_req_dn.bv_val , op->o_req_dn.bv_len)));
+ XPUSHs(sv_2mortal(newSVpv( avastr , avalen)));
PUTBACK;
count = call_method("compare", G_SCALAR);
PUSHMARK(sp);
XPUSHs( perl_back->pb_obj_ref );
- XPUSHs(sv_2mortal(newSVpv( op->o_req_dn.bv_val , 0 )));
+ XPUSHs(sv_2mortal(newSVpv( op->o_req_dn.bv_val , op->o_req_dn.bv_len )));
PUTBACK;
PUSHMARK(sp) ;
XPUSHs( perl_back->pb_obj_ref );
- XPUSHs(sv_2mortal(newSVpv( op->o_req_dn.bv_val , 0 )));
- XPUSHs(sv_2mortal(newSVpv( op->orr_newrdn.bv_val , 0 )));
+ XPUSHs(sv_2mortal(newSVpv( op->o_req_dn.bv_val , op->o_req_dn.bv_len )));
+ XPUSHs(sv_2mortal(newSVpv( op->orr_newrdn.bv_val , op->orr_newrdn.bv_len )));
XPUSHs(sv_2mortal(newSViv( op->orr_deleteoldrdn )));
if ( op->orr_newSup != NULL ) {
- XPUSHs(sv_2mortal(newSVpv( op->orr_newSup->bv_val , 0 )));
+ XPUSHs(sv_2mortal(newSVpv( op->orr_newSup->bv_val , op->orr_newSup->bv_len )));
}
PUTBACK ;
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;