]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
later times are a lower priority, not a higher priority
authorAndrew Tridgell <tridge@samba.org>
Thu, 7 Jun 2007 09:21:55 +0000 (19:21 +1000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 7 Jun 2007 09:21:55 +0000 (19:21 +1000)
(This used to be ctdb commit e96424e7d366df29767c4eeaccdcc0cc975cb8ae)

ctdb/common/ctdb_recoverd.c

index 217431a32edd079e209273fd3f6bfa4374a2fd3b..e14d4bda0cee5df5674a0274b687a1368b7f6a4d 100644 (file)
@@ -97,6 +97,7 @@ static void ctdb_ban_node(struct ctdb_recoverd *rec, uint32_t vnn, uint32_t ban_
        }
 
        if (vnn == ctdb->vnn) {
+               DEBUG(0,("self ban - lowering our election priority\n"));
                /* banning ourselves - lower our election priority */
                rec->priority_time = timeval_current();
        }
@@ -842,7 +843,7 @@ static bool ctdb_election_win(struct ctdb_recoverd *rec, struct election_message
 
        /* then the longest running node */
        if (cmp == 0) {
-               cmp = timeval_compare(&myem.priority_time, &em->priority_time);
+               cmp = timeval_compare(&em->priority_time, &myem.priority_time);
        }
 
        if (cmp == 0) {