mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 16:49:39 -05:00
Add op->o_tincr to distinguish ops with same op->o_time. (We should
be preparing to use timestamps with sub-second resolution, really.)
This commit is contained in:
parent
0658ff91b7
commit
e42e8d7130
2 changed files with 9 additions and 0 deletions
|
|
@ -39,6 +39,8 @@
|
|||
|
||||
static ldap_pvt_thread_mutex_t slap_op_mutex;
|
||||
static LDAP_STAILQ_HEAD(s_o, slap_op) slap_free_ops;
|
||||
static time_t last_time;
|
||||
static int last_incr;
|
||||
|
||||
void slap_op_init(void)
|
||||
{
|
||||
|
|
@ -142,6 +144,12 @@ slap_op_alloc(
|
|||
op->o_tag = tag;
|
||||
|
||||
op->o_time = slap_get_time();
|
||||
if ( op->o_time == last_time ) {
|
||||
op->o_tincr = ++last_incr;
|
||||
} else {
|
||||
last_time = op->o_time;
|
||||
last_incr = 0; /* o_tincr is alredy zero */
|
||||
}
|
||||
op->o_opid = id;
|
||||
op->o_res_ber = NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -2291,6 +2291,7 @@ typedef struct slap_op {
|
|||
|
||||
ber_tag_t o_tag; /* tag of the request */
|
||||
time_t o_time; /* time op was initiated */
|
||||
int o_tincr; /* counter for multiple ops with same o_time */
|
||||
|
||||
BackendDB *o_bd; /* backend DB processing this op */
|
||||
struct berval o_req_dn; /* DN of target of request */
|
||||
|
|
|
|||
Loading…
Reference in a new issue