s3:dbwrap_ctdb: fix check for skipping the __db_sequence_number__ in traverse
authorMichael Adam <obnox@samba.org>
Wed, 12 Oct 2011 10:03:42 +0000 (12:03 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 12 Oct 2011 20:45:52 +0000 (22:45 +0200)
Brown paperbag. This omitted the "== 0" hand hence skipped all keys of the
same length as __db_sequence_number__ but different from it...

source3/lib/dbwrap/dbwrap_ctdb.c

index ca43dc1b5837ea8adbaec2f19aa2b9bcfab294ec..cdb3d73c55788b8e521ab035d6adba9fb5d9676f 100644 (file)
@@ -1249,7 +1249,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 &&
-           strcmp((const char*)kbuf.dptr, CTDB_DB_SEQNUM_KEY))
+           strcmp((const char*)kbuf.dptr, CTDB_DB_SEQNUM_KEY) == 0)
        {
                goto done;
        }