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
{
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;
}
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
*/
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,
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));