From 54649993b2ef3065738d572be3ca10a76cb06412 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 12 Oct 2011 12:04:50 +0200 Subject: s3:dbwrap_ctdb: improve the check for skipping the __db_sequence_number__ record in traverse It did not compare the last charcter (usually '\0') --- source3/lib/dbwrap/dbwrap_ctdb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c index cdb3d73c55..4c5cd64da0 100644 --- a/source3/lib/dbwrap/dbwrap_ctdb.c +++ b/source3/lib/dbwrap/dbwrap_ctdb.c @@ -1361,8 +1361,7 @@ static int traverse_persistent_callback_read(TDB_CONTEXT *tdb, TDB_DATA kbuf, TD * This is used for persistent transactions internally. */ if (kbuf.dsize == strlen(CTDB_DB_SEQNUM_KEY) + 1 && - strncmp((const char*)kbuf.dptr, CTDB_DB_SEQNUM_KEY, - strlen(CTDB_DB_SEQNUM_KEY)) == 0) + strcmp((const char*)kbuf.dptr, CTDB_DB_SEQNUM_KEY) == 0) { return 0; } -- cgit