]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
fix a bug in pushdb control.
authorRonnie Sahlberg <sahlberg@ronnie>
Wed, 2 May 2007 00:25:14 +0000 (10:25 +1000)
committerRonnie Sahlberg <sahlberg@ronnie>
Wed, 2 May 2007 00:25:14 +0000 (10:25 +1000)
we should only write the pushed record if RSN of the new one if higher
than the rsn of the existing one    not the other way around

(This used to be ctdb commit f535008c3755cf84acff7bc73ea05c0901e940ef)

ctdb/common/ctdb_control.c

index b605e492b7a6fe532e49d02b7cb7969e07c1921d..eb4775d30daf3efe1df51e9daf54e29d52858a68 100644 (file)
@@ -385,7 +385,7 @@ static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb,
                                ctdb_ltdb_unlock(ctdb_db, key);
                                return -1;
                        }
-                       if (header.rsn > hdr->rsn) {
+                       if (header.rsn < hdr->rsn) {
                                ret = ctdb_ltdb_store(ctdb_db, key, hdr, data);
                                if (ret != 0) {
                                        DEBUG(0, (__location__ "Unable to store record\n"));