s3:dbwrap_ctdb: fix logic error in pull_newest_from_marshall_buffer().
authorMichael Adam <obnox@samba.org>
Tue, 5 Jan 2010 23:37:21 +0000 (00:37 +0100)
committerKarolin Seeger <kseeger@samba.org>
Wed, 31 Mar 2010 15:54:30 +0000 (17:54 +0200)
commite5cc0e718863d6cfaa59fbb4cac7d9b70fba0381
tree81062f1318a66fd9bdd38bcf0074ee62619d4a1f
parent89cb10de5ec46384c5ae8d558ac29e4f9e00e8a1
s3:dbwrap_ctdb: fix logic error in pull_newest_from_marshall_buffer().

The logic bug was that if a record was found in the marshall buffer,
then always the ctdb header of tha last record in the marshall buffer
was returned, and not the ctdb header of the last occurrence of the
requested record.

This is fixed by introducing an additional temporary variable.

Michael
(cherry picked from commit 524072b56bf659002410a817749bf86fe6f51e83)
source3/lib/dbwrap_ctdb.c