ctdb-daemon: Remove control CTDB_CONTROL_SET_CALL
authorAmitay Isaacs <amitay@gmail.com>
Thu, 9 Jul 2015 12:33:23 +0000 (22:33 +1000)
committerAmitay Isaacs <amitay@samba.org>
Fri, 10 Jul 2015 21:41:18 +0000 (23:41 +0200)
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

ctdb/client/ctdb_client.c
ctdb/include/ctdb_private.h
ctdb/include/ctdb_protocol.h
ctdb/server/ctdb_control.c

index d2c26275e0ba4a800a4b952b86ee65a731ff7eb7..7bffefefe87822238c5b0d9db7c439170e87f553 100644 (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;
 }
 
index 4413a320166b437b5b0c4ce5d0b89928b6af9b08..4cb0fe6a10198b8b06d93af95fd039b16ca14661 100644 (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
  */
index 4dea56b2534e5886b323ed0cf3178ba390a99652..d9cad7c6f18e19801ac06639d9b3e5452e059f23 100644 (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,
index 9069087f1e14585e759fedaf348f10f4194732ff..fda4c29134a1a9e97050d036a480c78440c4c907 100644 (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));