summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1505b69)
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
for (i=0; i<buf->count; i++) {
TDB_DATA tkey, tdata;
uint32_t reqid;
for (i=0; i<buf->count; i++) {
TDB_DATA tkey, tdata;
uint32_t reqid;
+ struct ctdb_ltdb_header hdr;
- rec = db_ctdb_marshall_loop_next(buf, rec, &reqid, &h, &tkey,
+ ZERO_STRUCT(hdr);
+
+ rec = db_ctdb_marshall_loop_next(buf, rec, &reqid, &hdr, &tkey,
&tdata);
if (rec == NULL) {
return false;
&tdata);
if (rec == NULL) {
return false;
if (tdb_data_equal(key, tkey)) {
found = true;
data = tdata;
if (tdb_data_equal(key, tkey)) {
found = true;
data = tdata;