diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index 067777a79f3..5b95b60fb0e 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -551,8 +551,6 @@ int daemon_register_message_handler(struct ctdb_context *ctdb, uint32_t client_id, uint64_t srvid); int daemon_deregister_message_handler(struct ctdb_context *ctdb, uint32_t client_id, uint64_t srvid); -int daemon_check_srvids(struct ctdb_context *ctdb, TDB_DATA indata, - TDB_DATA *outdata); int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork); diff --git a/ctdb/server/ctdb_control.c b/ctdb/server/ctdb_control.c index 40484434b4a..6e9bbeb2ff5 100644 --- a/ctdb/server/ctdb_control.c +++ b/ctdb/server/ctdb_control.c @@ -311,7 +311,7 @@ static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb, return daemon_deregister_message_handler(ctdb, client_id, srvid); case CTDB_CONTROL_CHECK_SRVIDS: - return daemon_check_srvids(ctdb, indata, outdata); + return control_not_implemented("CHECK_SRVIDS", NULL); case CTDB_CONTROL_ENABLE_SEQNUM: CHECK_CONTROL_DATA_SIZE(sizeof(uint32_t)); diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c index 1030406d7bb..28492ac7c01 100644 --- a/ctdb/server/ctdb_daemon.c +++ b/ctdb/server/ctdb_daemon.c @@ -208,37 +208,6 @@ int daemon_deregister_message_handler(struct ctdb_context *ctdb, uint32_t client return srvid_deregister(ctdb->srv, srvid, client); } -int daemon_check_srvids(struct ctdb_context *ctdb, TDB_DATA indata, - TDB_DATA *outdata) -{ - uint64_t *ids; - int i, num_ids; - uint8_t *results; - - if ((indata.dsize % sizeof(uint64_t)) != 0) { - DEBUG(DEBUG_ERR, ("Bad indata in daemon_check_srvids, " - "size=%d\n", (int)indata.dsize)); - return -1; - } - - ids = (uint64_t *)indata.dptr; - num_ids = indata.dsize / 8; - - results = talloc_zero_array(outdata, uint8_t, (num_ids+7)/8); - if (results == NULL) { - DEBUG(DEBUG_ERR, ("talloc failed in daemon_check_srvids\n")); - return -1; - } - for (i=0; isrv, ids[i]) == 0) { - results[i/8] |= (1 << (i%8)); - } - } - outdata->dptr = (uint8_t *)results; - outdata->dsize = talloc_get_size(results); - return 0; -} - /* destroy a ctdb_client */