From ef219698199883858a528b11148fe7c00c02b860 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 29 Jan 2007 11:31:24 +0000 Subject: r21045: every call in brlock_ctdb ended up neededing a 32 bit status code, so rather than allocating a reply_data field each time, I have changed the ctdb_call API to include a status code. That greatly simplifies use of the API. (This used to be commit 70c3acaf8876fa5712e2135df234fe3bc1e32e77) --- source4/cluster/ctdb/include/ctdb.h | 2 ++ source4/cluster/ctdb/include/ctdb_private.h | 1 + 2 files changed, 3 insertions(+) (limited to 'source4/cluster/ctdb/include') diff --git a/source4/cluster/ctdb/include/ctdb.h b/source4/cluster/ctdb/include/ctdb.h index 8a2006f678..7eebcb83db 100644 --- a/source4/cluster/ctdb/include/ctdb.h +++ b/source4/cluster/ctdb/include/ctdb.h @@ -26,6 +26,7 @@ struct ctdb_call { TDB_DATA key; TDB_DATA call_data; TDB_DATA reply_data; + uint32_t status; }; /* @@ -37,6 +38,7 @@ struct ctdb_call_info { TDB_DATA *new_data; /* optionally updated record data */ TDB_DATA *call_data; /* optionally passed from caller */ TDB_DATA *reply_data; /* optionally returned by function */ + uint32_t status; /* optional reply status - defaults to zero */ }; #define CTDB_ERR_INVALID 1 diff --git a/source4/cluster/ctdb/include/ctdb_private.h b/source4/cluster/ctdb/include/ctdb_private.h index db7da8fcaf..977206f400 100644 --- a/source4/cluster/ctdb/include/ctdb_private.h +++ b/source4/cluster/ctdb/include/ctdb_private.h @@ -162,6 +162,7 @@ struct ctdb_req_call { struct ctdb_reply_call { struct ctdb_req_header hdr; + uint32_t status; uint32_t datalen; uint8_t data[1]; }; -- cgit