mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-31 14:50:34 +08:00
ITS#9759 Honour requested insert position in olcRetcodeItem
This commit is contained in:
parent
ba37508f80
commit
d094cf2cb5
@ -1237,10 +1237,14 @@ rc_cf_gen( ConfigArgs *c )
|
||||
}
|
||||
*--next = '\0';
|
||||
|
||||
for ( rdip = &rd->rd_item; *rdip; rdip = &(*rdip)->rdi_next )
|
||||
/* go to last */ ;
|
||||
/* We're marked X-ORDERED 'VALUES', valx might be valid */
|
||||
for ( i = 0, rdip = &rd->rd_item;
|
||||
*rdip && (c->valx < 0 || i < c->valx);
|
||||
rdip = &(*rdip)->rdi_next, i++ )
|
||||
/* go to position */ ;
|
||||
|
||||
|
||||
rdi.rdi_next = *rdip;
|
||||
*rdip = ( retcode_item_t * )ch_malloc( sizeof( retcode_item_t ) );
|
||||
*(*rdip) = rdi;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user