From: Michael Adam Date: Wed, 12 Oct 2011 10:04:50 +0000 (+0200) Subject: s3:dbwrap_ctdb: improve the check for skipping the __db_sequence_number__ record... X-Git-Url: http://git.samba.org/?p=obnox%2Fsamba%2Fsamba-obnox.git;a=commitdiff_plain;h=54649993b2ef3065738d572be3ca10a76cb06412 s3:dbwrap_ctdb: improve the check for skipping the __db_sequence_number__ record in traverse It did not compare the last charcter (usually '\0') --- diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c index cdb3d73c557..4c5cd64da04 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; }