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)
committerMichael Adam <obnox@samba.org>
Tue, 5 Jan 2010 23:37:21 +0000 (00:37 +0100)
commit68747f49c7338a905ed9beac6300b20c0a8a064e
tree4bf7c462ba854a4e5f2eb33deb24ea7694c40617
parentb130fa9d595893621c8f5b9088f4e123bc9644c5
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
source3/lib/dbwrap_ctdb.c