Rev 652: remove the ctdb header from the data in the persistent
read-only traverse callback in http://samba.org/~tridge/3_0-ctdb
tridge at samba.org
tridge at samba.org
Thu Oct 18 04:27:40 GMT 2007
------------------------------------------------------------
revno: 652
revision-id: tridge at samba.org-20071018042739-pkht3q9o2wrcka6d
parent: tridge at samba.org-20071018042005-cvo5t7vnso6tvyxd
committer: Andrew Tridgell <tridge at samba.org>
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);
}
More information about the samba-cvs
mailing list