int freeit )
{
BerElement *ber;
- ber_tag_t rc;
ber_tag_t tag;
ber_len_t len;
struct berval *resdata;
return ld->ld_errno;
}
- rc = ber_scanf( ber, "{" /*}*/ );
+ tag = ber_scanf( ber, "{" /*}*/ );
- if( rc == LBER_ERROR ) {
+ if( tag == LBER_ERROR ) {
ld->ld_errno = LDAP_DECODING_ERROR;
ber_free( ber, 0 );
return ld->ld_errno;
}
if ( serverctrls == NULL ) {
- rc = LDAP_SUCCESS;
+ ld->ld_errno = LDAP_SUCCESS;
goto free_and_return;
}
if ( ber_scanf( ber, /*{*/ "}" ) == LBER_ERROR ) {
- rc = LDAP_DECODING_ERROR;
+ ld->ld_errno = LDAP_DECODING_ERROR;
goto free_and_return;
}
- rc = ldap_pvt_get_controls( ber, serverctrls );
+ ld->ld_errno = ldap_pvt_get_controls( ber, serverctrls );
free_and_return:
ber_free( ber, 0 );
ldap_msgfree( res );
}
- return LDAP_SUCCESS;
+ return ld->ld_errno;
}