s3:dbwrap_ctdb: fix logic error in pull_newest_from_marshall_buffer().
commit249d7bab417a51fbdc1b84c5d84aa81ccdb3e94b
authorMichael Adam <obnox@samba.org>
Tue, 5 Jan 2010 23:37:21 +0000 (6 00:37 +0100)
committerKarolin Seeger <kseeger@samba.org>
Thu, 1 Apr 2010 07:39:15 +0000 (1 09:39 +0200)
treeaf9c56278d81bd59963963f0621ee94cd31d6a05
parentc440c6ba9fc2f4da4d1452014e0f196efb6fd0c2
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)
(cherry picked from commit e5cc0e718863d6cfaa59fbb4cac7d9b70fba0381)
source3/lib/dbwrap_ctdb.c