summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2015-07-09 22:33:23 +1000
committerAmitay Isaacs <amitay@samba.org>2015-07-10 23:41:18 +0200
commit37e1502f684a74301fe96e4c4c0aaa15d0c8965a (patch)
tree9a93089b98b34128f7b62585d52fff6bc015fd58 /ctdb
parent9aa90482f8ffbddf898eb8a900112f45d82f0930 (diff)
downloadsamba-37e1502f684a74301fe96e4c4c0aaa15d0c8965a.tar.gz
ctdb-daemon: Remove control CTDB_CONTROL_SET_CALL
This has not been used for a long time. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Fri Jul 10 23:41:18 CEST 2015 on sn-devel-104
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/client/ctdb_client.c26
-rw-r--r--ctdb/include/ctdb_private.h9
-rw-r--r--ctdb/include/ctdb_protocol.h2
-rw-r--r--ctdb/server/ctdb_control.c8
4 files changed, 5 insertions, 40 deletions
diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c
index d2c26275e0b..7bffefefe87 100644
--- a/ctdb/client/ctdb_client.c
+++ b/ctdb/client/ctdb_client.c
@@ -2161,34 +2161,12 @@ int ctdb_set_call(struct ctdb_db_context *ctdb_db, ctdb_fn_t fn, uint32_t id)
{
struct ctdb_registered_call *call;
-#if 0
- TDB_DATA data;
- int32_t status;
- struct ctdb_control_set_call c;
- int ret;
-
- /* this is no longer valid with the separate daemon architecture */
- c.db_id = ctdb_db->db_id;
- c.fn = fn;
- c.id = id;
-
- data.dptr = (uint8_t *)&c;
- data.dsize = sizeof(c);
-
- ret = ctdb_control(ctdb_db->ctdb, CTDB_CURRENT_NODE, 0, CTDB_CONTROL_SET_CALL, 0,
- data, NULL, NULL, &status, NULL, NULL);
- if (ret != 0 || status != 0) {
- DEBUG(DEBUG_ERR,("ctdb_set_call failed for call %u\n", id));
- return -1;
- }
-#endif
-
- /* also register locally */
+ /* register locally */
call = talloc(ctdb_db, struct ctdb_registered_call);
call->fn = fn;
call->id = id;
- DLIST_ADD(ctdb_db->calls, call);
+ DLIST_ADD(ctdb_db->calls, call);
return 0;
}
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h
index 4413a320166..4cb0fe6a101 100644
--- a/ctdb/include/ctdb_private.h
+++ b/ctdb/include/ctdb_private.h
@@ -608,15 +608,6 @@ struct ctdb_db_context {
}} while (0)
/*
- structure passed in set_call control
- */
-struct ctdb_control_set_call {
- uint32_t db_id;
- ctdb_fn_t fn;
- uint32_t id;
-};
-
-/*
struct for kill_tcp control
*/
struct ctdb_control_killtcp {
diff --git a/ctdb/include/ctdb_protocol.h b/ctdb/include/ctdb_protocol.h
index 4dea56b2534..d9cad7c6f18 100644
--- a/ctdb/include/ctdb_protocol.h
+++ b/ctdb/include/ctdb_protocol.h
@@ -298,7 +298,7 @@ enum ctdb_controls {CTDB_CONTROL_PROCESS_EXISTS = 0,
CTDB_CONTROL_SET_RECMODE = 16,
CTDB_CONTROL_STATISTICS_RESET = 17,
CTDB_CONTROL_DB_ATTACH = 18,
- CTDB_CONTROL_SET_CALL = 19,
+ CTDB_CONTROL_SET_CALL = 19, /* obsolete */
CTDB_CONTROL_TRAVERSE_START = 20,
CTDB_CONTROL_TRAVERSE_ALL = 21,
CTDB_CONTROL_TRAVERSE_DATA = 22,
diff --git a/ctdb/server/ctdb_control.c b/ctdb/server/ctdb_control.c
index 9069087f1e1..fda4c29134a 100644
--- a/ctdb/server/ctdb_control.c
+++ b/ctdb/server/ctdb_control.c
@@ -270,12 +270,8 @@ static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb,
case CTDB_CONTROL_DB_ATTACH_PERSISTENT:
return ctdb_control_db_attach(ctdb, indata, outdata, srvid, true, client_id, c, async_reply);
- case CTDB_CONTROL_SET_CALL: {
- struct ctdb_control_set_call *sc =
- (struct ctdb_control_set_call *)indata.dptr;
- CHECK_CONTROL_DATA_SIZE(sizeof(struct ctdb_control_set_call));
- return ctdb_daemon_set_call(ctdb, sc->db_id, sc->fn, sc->id);
- }
+ case CTDB_CONTROL_SET_CALL:
+ return control_not_implemented("SET_CALL", NULL);
case CTDB_CONTROL_TRAVERSE_START:
CHECK_CONTROL_DATA_SIZE(sizeof(struct ctdb_traverse_start));