summaryrefslogtreecommitdiffstats
path: root/ctdb/client
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-12-03 02:15:30 +0100
committerMichael Adam <obnox@samba.org>2011-12-03 02:15:30 +0100
commitad0de5494e90e14b61f66ac6232fae50381029bb (patch)
tree6e6e5662eb696bc8fc1f61730c97c8e0dc67b5d2 /ctdb/client
parente15df55b5e5e0ca8763b12e345e4cce4ebce6d3e (diff)
downloadsamba-ad0de5494e90e14b61f66ac6232fae50381029bb.tar.gz
samba-ad0de5494e90e14b61f66ac6232fae50381029bb.tar.xz
samba-ad0de5494e90e14b61f66ac6232fae50381029bb.zip
traverse: fix traversing with empty records by adding a new (internal) control CTDB_CONTROL_TRAVERSE_START_EXT
By this, the original CTDB_CONTROL_TRAVERSE_START control that is used by e.g. samba's smbstatus, is not changed, so that samba continues working without code change. The CTDB_CONTROL_TRAVERSE_START currently just adds the "withemptyrecords" flag to the state and processon on as CTDB_CONTROL_TRAVERSE_START_EXT. (This used to be ctdb commit 8281bb210858ed04992eacea7f6d02261e0fc1b1)
Diffstat (limited to 'ctdb/client')
-rw-r--r--ctdb/client/ctdb_client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c
index 75ad0e134fa..224cdc03ee4 100644
--- a/ctdb/client/ctdb_client.c
+++ b/ctdb/client/ctdb_client.c
@@ -2059,7 +2059,7 @@ static int ctdb_traverse_ext(struct ctdb_db_context *ctdb_db,
void *private_data)
{
TDB_DATA data;
- struct ctdb_traverse_start t;
+ struct ctdb_traverse_start_ext t;
int32_t status;
int ret;
uint64_t srvid = (getpid() | 0xFLL<<60);
@@ -2085,7 +2085,7 @@ static int ctdb_traverse_ext(struct ctdb_db_context *ctdb_db,
data.dptr = (uint8_t *)&t;
data.dsize = sizeof(t);
- ret = ctdb_control(ctdb_db->ctdb, CTDB_CURRENT_NODE, 0, CTDB_CONTROL_TRAVERSE_START, 0,
+ ret = ctdb_control(ctdb_db->ctdb, CTDB_CURRENT_NODE, 0, CTDB_CONTROL_TRAVERSE_START_EXT, 0,
data, NULL, NULL, &status, NULL, NULL);
if (ret != 0 || status != 0) {
DEBUG(DEBUG_ERR,("ctdb_traverse_all failed\n"));