From 417c16e4e6d6a51171f8d2982e8bf9c4d602e058 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 27 Sep 2011 16:06:48 +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') Autobuild-User: Michael Adam Autobuild-Date: Wed Sep 28 16:54:59 CEST 2011 on sn-devel-104 --- 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 d9fb48950c..84d7b2fc2f 100644 --- a/source3/lib/dbwrap/dbwrap_ctdb.c +++ b/source3/lib/dbwrap/dbwrap_ctdb.c @@ -1267,8 +1267,7 @@ static int traverse_persistent_callback(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DAT * 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)) { goto done; } -- cgit