------------------------------------------------------------
revno: 652
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: s3-ctdb-tridge
timestamp: Thu 2007-10-18 14:27:39 +1000
message:
  remove the ctdb header from the data in the persistent read-only traverse 
callback
modified:
  source/lib/dbwrap_ctdb.c       dbwrap_ctdb.c-20070415131935-89u7zduywa3g216g-1
=== modified file 'source/lib/dbwrap_ctdb.c'
--- a/source/lib/dbwrap_ctdb.c  2007-10-18 04:12:24 +0000
+++ b/source/lib/dbwrap_ctdb.c  2007-10-18 04:27:39 +0000
@@ -390,6 +390,14 @@
        rec.store = db_ctdb_store_deny;
        rec.delete_rec = db_ctdb_delete_deny;
        rec.private_data = state->db;
+
+       if (rec.value.dsize <= sizeof(struct ctdb_ltdb_header)) {
+               /* a deleted record */
+               return 0;
+       }
+       rec.value.dsize -= sizeof(struct ctdb_ltdb_header);
+       rec.value.dptr += sizeof(struct ctdb_ltdb_header);
+
        return state->fn(&rec, state->private_data);
 }
 

Reply via email to