fix objectclass mapping (to nothing)

This commit is contained in:
Pierangelo Masarati 2003-01-27 16:07:10 +00:00
parent d1cc80694f
commit a62249ed27
2 changed files with 4 additions and 4 deletions

View File

@ -492,7 +492,7 @@ ldap_send_entry(
while ( ber_scanf( &ber, "{m", &a ) != LBER_ERROR ) {
ldap_back_map(&li->at_map, &a, &mapped, 1);
if (mapped.bv_val == NULL)
if (mapped.bv_val == NULL || mapped.bv_val[0] == '\0')
continue;
attr = (Attribute *)ch_malloc( sizeof(Attribute) );
if (attr == NULL)
@ -537,7 +537,7 @@ ldap_send_entry(
for ( last = 0; attr->a_vals[last].bv_val; last++ ) ;
for ( i = 0, bv = attr->a_vals; bv->bv_val; bv++, i++ ) {
ldap_back_map(&li->oc_map, bv, &mapped, 1);
if (mapped.bv_val == NULL) {
if (mapped.bv_val == NULL || mapped.bv_val[0] == '\0') {
LBER_FREE(bv->bv_val);
bv->bv_val = NULL;
if (--last < 0)

View File

@ -727,7 +727,7 @@ meta_send_entry(
while ( ber_scanf( &ber, "{m", &a ) != LBER_ERROR ) {
ldap_back_map( &li->targets[ target ]->at_map,
&a, &mapped, 1 );
if ( mapped.bv_val == NULL ) {
if ( mapped.bv_val == NULL || mapped.bv_val[0] == '\0' ) {
continue;
}
attr = ( Attribute * )ch_malloc( sizeof( Attribute ) );
@ -771,7 +771,7 @@ meta_send_entry(
for ( i = 0, bv = attr->a_vals; bv->bv_val; bv++, i++ ) {
ldap_back_map( &li->targets[ target]->oc_map,
bv, &mapped, 1 );
if ( mapped.bv_val == NULL ) {
if ( mapped.bv_val == NULL || mapped.bv_val[0] == '\0') {
free( bv->bv_val );
bv->bv_val = NULL;
if ( --last < 0 ) {