mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
ITS#5979 don't create reqOld attr if there was no previous value
This commit is contained in:
parent
1f5937f993
commit
8597332057
@ -1551,22 +1551,24 @@ static int accesslog_response(Operation *op, SlapReply *rs) {
|
|||||||
i += a->a_numvals;
|
i += a->a_numvals;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
vals = ch_malloc( (i + 1) * sizeof( struct berval ) );
|
if ( i ) {
|
||||||
i = 0;
|
vals = ch_malloc( (i + 1) * sizeof( struct berval ) );
|
||||||
for ( a=old->e_attrs; a; a=a->a_next ) {
|
i = 0;
|
||||||
if ( a->a_vals && a->a_flags ) {
|
for ( a=old->e_attrs; a; a=a->a_next ) {
|
||||||
for (b=a->a_vals; !BER_BVISNULL( b ); b++,i++) {
|
if ( a->a_vals && a->a_flags ) {
|
||||||
accesslog_val2val( a->a_desc, b, 0, &vals[i] );
|
for (b=a->a_vals; !BER_BVISNULL( b ); b++,i++) {
|
||||||
|
accesslog_val2val( a->a_desc, b, 0, &vals[i] );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
vals[i].bv_val = NULL;
|
||||||
|
vals[i].bv_len = 0;
|
||||||
|
a = attr_alloc( ad_reqOld );
|
||||||
|
a->a_numvals = i;
|
||||||
|
a->a_vals = vals;
|
||||||
|
a->a_nvals = vals;
|
||||||
|
last_attr->a_next = a;
|
||||||
}
|
}
|
||||||
vals[i].bv_val = NULL;
|
|
||||||
vals[i].bv_len = 0;
|
|
||||||
a = attr_alloc( ad_reqOld );
|
|
||||||
a->a_numvals = i;
|
|
||||||
a->a_vals = vals;
|
|
||||||
a->a_nvals = vals;
|
|
||||||
last_attr->a_next = a;
|
|
||||||
}
|
}
|
||||||
if ( logop == LOG_EN_MODIFY ) {
|
if ( logop == LOG_EN_MODIFY ) {
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user