X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Foverlays%2Faccesslog.c;h=7d8cf7314945571230bb7bc1cf5fefecdcfd973b;hb=9d5d7eba7192c6dab7c6f8ef6fb3d083b53565db;hp=bc5b7b6e57a9809d48a4e63f04cca905de998f2d;hpb=08836a7d2d12660c51191c3c4958b013dace2647;p=openldap diff --git a/servers/slapd/overlays/accesslog.c b/servers/slapd/overlays/accesslog.c index bc5b7b6e57..7d8cf73149 100644 --- a/servers/slapd/overlays/accesslog.c +++ b/servers/slapd/overlays/accesslog.c @@ -1457,7 +1457,7 @@ static int accesslog_response(Operation *op, SlapReply *rs) { Modifications *m; struct berval *b, uuid = BER_BVNULL; int i; - int logop; + int logop, do_graduate = 0; slap_verbmasks *lo; Entry *e = NULL, *old = NULL, *e_uuid = NULL; char timebuf[LDAP_LUTIL_GENTIME_BUFSIZE+8]; @@ -1795,7 +1795,7 @@ static int accesslog_response(Operation *op, SlapReply *rs) { } if ( e_uuid || !BER_BVISNULL( &uuid ) ) { - struct berval *pbv; + struct berval *pbv = NULL; if ( !BER_BVISNULL( &uuid ) ) { pbv = &uuid; @@ -1829,11 +1829,17 @@ static int accesslog_response(Operation *op, SlapReply *rs) { if (( lo->mask & LOG_OP_WRITES ) && !BER_BVISEMPTY( &op->o_csn )) { slap_queue_csn( &op2, &op->o_csn ); + do_graduate = 1; } op2.o_bd->be_add( &op2, &rs2 ); if ( e == op2.ora_e ) entry_free( e ); e = NULL; + if ( do_graduate ) { + slap_graduate_commit_csn( &op2 ); + if ( op2.o_csn.bv_val ) + op->o_tmpfree( op2.o_csn.bv_val, op->o_tmpmemctx ); + } done: if ( lo->mask & LOG_OP_WRITES )