v2[len-1] = '\n';
memcpy(&v2[len], ref[i]->bv_val, ref[i]->bv_len );
len += ref[i]->bv_len;
+ if (ref[i]->bv_val[ref[i]->bv_len-1] != '/')
+ ++len;
}
v2[len-1] = '\0';
const char *text,
struct berval **ref,
const char *resoid,
- struct berval *resdata,
+ struct berval *data,
LDAPControl **ctrls
)
{
rc = ber_printf( ber, "s", resoid );
}
- if( rc != -1 && resdata != NULL ) {
- rc = ber_printf( ber, "O", resdata );
-
+ if( rc != -1 && data != NULL ) {
+ rc = ber_printf( ber, "O", data );
}
if( rc != -1 ) {
if( op->o_protocol < LDAP_VERSION3 ) {
/* save the references for the result */
- if( *refs == NULL ) {
+ if( *refs != NULL ) {
value_add( v2refs, refs );
}
return 0;