1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-26 01:49:31 +03:00

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
This commit is contained in:
Amitay Isaacs
2015-07-09 22:33:23 +10:00
committed by Amitay Isaacs
parent 9aa90482f8
commit 37e1502f68
4 changed files with 5 additions and 40 deletions

View File

@ -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;
}

View File

@ -607,15 +607,6 @@ struct ctdb_db_context {
ctdb_fatal(ctdb, "Out of memory in " __location__ ); \
}} 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
*/

View File

@ -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,

View File

@ -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));