mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-22 23:02:55 -05:00
ITS#10109 Pass operation to slap_get_csn()
This commit is contained in:
parent
860b61f41d
commit
8260500e7c
1 changed files with 10 additions and 2 deletions
|
|
@ -372,7 +372,7 @@ best_guess( Operation *op,
|
|||
|
||||
entryCSN.bv_val = csnbuf;
|
||||
entryCSN.bv_len = sizeof( csnbuf );
|
||||
slap_get_csn( NULL, &entryCSN, 0 );
|
||||
slap_get_csn( op, &entryCSN, 0 );
|
||||
|
||||
ber_dupbv( bv_entryCSN, &entryCSN );
|
||||
ber_dupbv( bv_nentryCSN, &entryCSN );
|
||||
|
|
@ -821,6 +821,11 @@ lastmod_db_open( BackendDB *be, ConfigReply *cr )
|
|||
static char tmbuf[ LDAP_LUTIL_GENTIME_BUFSIZE ];
|
||||
|
||||
char csnbuf[ LDAP_PVT_CSNSTR_BUFSIZE ];
|
||||
void *thrctx = ldap_pvt_thread_pool_context();
|
||||
Connection conn = { 0 };
|
||||
OperationBuffer opbuf;
|
||||
Operation *op;
|
||||
|
||||
struct berval entryCSN;
|
||||
struct berval timestamp;
|
||||
|
||||
|
|
@ -829,6 +834,9 @@ lastmod_db_open( BackendDB *be, ConfigReply *cr )
|
|||
return -1;
|
||||
}
|
||||
|
||||
connection_fake_init2( &conn, &opbuf, thrctx, 0 );
|
||||
op = &opbuf.ob_op;
|
||||
|
||||
/*
|
||||
* Start
|
||||
*/
|
||||
|
|
@ -838,7 +846,7 @@ lastmod_db_open( BackendDB *be, ConfigReply *cr )
|
|||
|
||||
entryCSN.bv_val = csnbuf;
|
||||
entryCSN.bv_len = sizeof( csnbuf );
|
||||
slap_get_csn( NULL, &entryCSN, 0 );
|
||||
slap_get_csn( op, &entryCSN, 0 );
|
||||
|
||||
if ( BER_BVISNULL( &lmi->lmi_rdnvalue ) ) {
|
||||
ber_str2bv( "Lastmod", 0, 1, &lmi->lmi_rdnvalue );
|
||||
|
|
|
|||
Loading…
Reference in a new issue