Skip to content
Snippets Groups Projects
Commit e42e8d71 authored by Howard Chu's avatar Howard Chu
Browse files

Add op->o_tincr to distinguish ops with same op->o_time. (We should

be preparing to use timestamps with sub-second resolution, really.)
parent 0658ff91
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment