Skip to content

Commit

Permalink
accesslog: resolve FIXME.
Browse files Browse the repository at this point in the history
 FIXME: contextCSN could have multiple values!
        should select the one with the server's SID.

Seems this partially fixes the #121

Change-Id: I0228166091d02bd66962b76a88473e517ed1398d
  • Loading branch information
erthink committed Nov 21, 2018
1 parent 9b9f4c5 commit 7721dac
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions servers/slapd/overlays/accesslog.c
Original file line number Diff line number Diff line change
Expand Up @@ -2279,10 +2279,12 @@ static void *accesslog_db_root(void *ctx, void *arg) {

a = attr_find(e_ctx->e_attrs, slap_schema.si_ad_contextCSN);
if (a) {
/* FIXME: contextCSN could have multiple values!
* should select the one with the server's SID */
attr_merge_one(e, slap_schema.si_ad_entryCSN, &a->a_vals[0],
&a->a_nvals[0]);
int i = a->a_numvals;
while (--i > 0)
if (slap_serverID == slap_csn_get_sid(a->a_vals + 1))
break;
attr_merge_one(e, slap_schema.si_ad_entryCSN, &a->a_vals[i],
&a->a_nvals[i]);
attr_merge(e, a->a_desc, a->a_vals, a->a_nvals);
}
be_entry_release_rw(op, e_ctx, 0);
Expand Down

0 comments on commit 7721dac

Please sign in to comment.