mirror of
https://github.com/samba-team/samba.git
synced 2025-02-23 09:57:40 +03:00
rename ctdb_send_message to ctdb_client_send_message to resolve colission with the function of the same name in libctdb
(This used to be ctdb commit ac3292c12832484a22715f1d46aa23f3b7c8a6f6)
This commit is contained in:
parent
d3a696c6a8
commit
761a075de9
@ -517,7 +517,7 @@ int ctdb_remove_message_handler(struct ctdb_context *ctdb, uint64_t srvid, void
|
||||
/*
|
||||
send a message - from client context
|
||||
*/
|
||||
int ctdb_send_message(struct ctdb_context *ctdb, uint32_t pnn,
|
||||
int ctdb_client_send_message(struct ctdb_context *ctdb, uint32_t pnn,
|
||||
uint64_t srvid, TDB_DATA data)
|
||||
{
|
||||
struct ctdb_req_message *r;
|
||||
|
@ -144,7 +144,7 @@ static void ctdb_collect_log(struct ctdb_context *ctdb, struct ctdb_get_log_addr
|
||||
DEBUG(DEBUG_ERR,("Marshalling log entries into a blob of %d bytes\n", (int)data.dsize));
|
||||
|
||||
DEBUG(DEBUG_ERR,("Send log to %d:%d\n", (int)log_addr->pnn, (int)log_addr->srvid));
|
||||
ctdb_send_message(ctdb, log_addr->pnn, log_addr->srvid, data);
|
||||
ctdb_client_send_message(ctdb, log_addr->pnn, log_addr->srvid, data);
|
||||
|
||||
talloc_free(data.dptr);
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ struct ctdb_client_call_state *ctdb_call_send(struct ctdb_db_context *ctdb_db, s
|
||||
int ctdb_call_recv(struct ctdb_client_call_state *state, struct ctdb_call *call);
|
||||
|
||||
/* send a ctdb message */
|
||||
int ctdb_send_message(struct ctdb_context *ctdb, uint32_t pnn,
|
||||
int ctdb_client_send_message(struct ctdb_context *ctdb, uint32_t pnn,
|
||||
uint64_t srvid, TDB_DATA data);
|
||||
|
||||
|
||||
|
@ -1641,7 +1641,7 @@ static int do_recovery(struct ctdb_recoverd *rec,
|
||||
|
||||
/* send a message to all clients telling them that the cluster
|
||||
has been reconfigured */
|
||||
ctdb_send_message(ctdb, CTDB_BROADCAST_CONNECTED, CTDB_SRVID_RECONFIGURE, tdb_null);
|
||||
ctdb_client_send_message(ctdb, CTDB_BROADCAST_CONNECTED, CTDB_SRVID_RECONFIGURE, tdb_null);
|
||||
|
||||
DEBUG(DEBUG_NOTICE, (__location__ " Recovery complete\n"));
|
||||
|
||||
@ -1802,7 +1802,7 @@ static int send_election_request(struct ctdb_recoverd *rec, uint32_t pnn, bool u
|
||||
|
||||
/* send an election message to all active nodes */
|
||||
DEBUG(DEBUG_INFO,(__location__ " Send election request to all active nodes\n"));
|
||||
ctdb_send_message(ctdb, CTDB_BROADCAST_ALL, srvid, election_data);
|
||||
ctdb_client_send_message(ctdb, CTDB_BROADCAST_ALL, srvid, election_data);
|
||||
|
||||
|
||||
/* A new node that is already frozen has entered the cluster.
|
||||
@ -1900,7 +1900,7 @@ static void mem_dump_handler(struct ctdb_context *ctdb, uint64_t srvid,
|
||||
|
||||
DEBUG(DEBUG_ERR, ("recovery master memory dump\n"));
|
||||
|
||||
ret = ctdb_send_message(ctdb, rd->pnn, rd->srvid, *dump);
|
||||
ret = ctdb_client_send_message(ctdb, rd->pnn, rd->srvid, *dump);
|
||||
if (ret != 0) {
|
||||
DEBUG(DEBUG_ERR,("Failed to send rd memdump reply message\n"));
|
||||
talloc_free(tmp_ctx);
|
||||
@ -2059,7 +2059,7 @@ static void process_ipreallocate_requests(struct ctdb_context *ctdb, struct ctdb
|
||||
DEBUG(DEBUG_INFO,("Sending ip reallocate reply message to "
|
||||
"%u:%llu\n", (unsigned)callers->rd->pnn,
|
||||
(unsigned long long)callers->rd->srvid));
|
||||
ret = ctdb_send_message(ctdb, callers->rd->pnn, callers->rd->srvid, result);
|
||||
ret = ctdb_client_send_message(ctdb, callers->rd->pnn, callers->rd->srvid, result);
|
||||
if (ret != 0) {
|
||||
DEBUG(DEBUG_ERR,("Failed to send ip reallocate reply "
|
||||
"message to %u:%llu\n",
|
||||
@ -2607,7 +2607,7 @@ static int verify_local_ip_allocation(struct ctdb_context *ctdb, struct ctdb_rec
|
||||
data.dptr = (uint8_t *)&rd;
|
||||
data.dsize = sizeof(rd);
|
||||
|
||||
ret = ctdb_send_message(ctdb, rec->recmaster, CTDB_SRVID_TAKEOVER_RUN, data);
|
||||
ret = ctdb_client_send_message(ctdb, rec->recmaster, CTDB_SRVID_TAKEOVER_RUN, data);
|
||||
if (ret != 0) {
|
||||
DEBUG(DEBUG_ERR,(__location__ " Failed to send ipreallocate to recmaster :%d\n", (int)rec->recmaster));
|
||||
}
|
||||
|
@ -272,7 +272,7 @@ static int ctdb_vacuum_db(struct ctdb_db_context *ctdb_db, struct vacuum_data *v
|
||||
|
||||
data.dsize = talloc_get_size(vdata->list[i]);
|
||||
data.dptr = (void *)vdata->list[i];
|
||||
if (ctdb_send_message(ctdb, ctdb->vnn_map->map[i], CTDB_SRVID_VACUUM_FETCH, data) != 0) {
|
||||
if (ctdb_client_send_message(ctdb, ctdb->vnn_map->map[i], CTDB_SRVID_VACUUM_FETCH, data) != 0) {
|
||||
DEBUG(DEBUG_ERR,(__location__ " Failed to send vacuum fetch message to %u\n",
|
||||
ctdb->vnn_map->map[i]));
|
||||
return -1;
|
||||
|
@ -94,7 +94,7 @@ static void ring_message_handler(struct ctdb_context *ctdb, uint64_t srvid,
|
||||
|
||||
(*count)++;
|
||||
dest = (ctdb_get_pnn(ctdb) + num_nodes + incr) % num_nodes;
|
||||
ctdb_send_message(ctdb, dest, srvid, data);
|
||||
ctdb_client_send_message(ctdb, dest, srvid, data);
|
||||
if (incr == 1) {
|
||||
msg_plus++;
|
||||
} else {
|
||||
@ -114,7 +114,7 @@ static void send_start_messages(struct ctdb_context *ctdb, int incr)
|
||||
data.dsize = sizeof(incr);
|
||||
|
||||
dest = (ctdb_get_pnn(ctdb) + num_nodes + incr) % num_nodes;
|
||||
ctdb_send_message(ctdb, dest, 0, data);
|
||||
ctdb_client_send_message(ctdb, dest, 0, data);
|
||||
}
|
||||
|
||||
static void each_second(struct event_context *ev, struct timed_event *te,
|
||||
|
@ -99,7 +99,7 @@ static void bench_fetch_1node(struct ctdb_context *ctdb)
|
||||
nulldata.dsize = 0;
|
||||
|
||||
dest = (ctdb_get_pnn(ctdb) + 1) % num_nodes;
|
||||
ctdb_send_message(ctdb, dest, 0, nulldata);
|
||||
ctdb_client_send_message(ctdb, dest, 0, nulldata);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1012,7 +1012,7 @@ static int move_ip(struct ctdb_context *ctdb, ctdb_sock_addr *addr, uint32_t pnn
|
||||
disable_time = 30;
|
||||
data.dptr = (uint8_t*)&disable_time;
|
||||
data.dsize = sizeof(disable_time);
|
||||
ret = ctdb_send_message(ctdb, CTDB_BROADCAST_CONNECTED, CTDB_SRVID_DISABLE_IP_CHECK, data);
|
||||
ret = ctdb_client_send_message(ctdb, CTDB_BROADCAST_CONNECTED, CTDB_SRVID_DISABLE_IP_CHECK, data);
|
||||
if (ret != 0) {
|
||||
DEBUG(DEBUG_ERR,("Failed to send message to disable ipcheck\n"));
|
||||
return -1;
|
||||
@ -1076,7 +1076,7 @@ static int move_ip(struct ctdb_context *ctdb, ctdb_sock_addr *addr, uint32_t pnn
|
||||
/* update the recovery daemon so it now knows to expect the new
|
||||
node assignment for this ip.
|
||||
*/
|
||||
ret = ctdb_send_message(ctdb, CTDB_BROADCAST_CONNECTED, CTDB_SRVID_RECD_UPDATE_IP, data);
|
||||
ret = ctdb_client_send_message(ctdb, CTDB_BROADCAST_CONNECTED, CTDB_SRVID_RECD_UPDATE_IP, data);
|
||||
if (ret != 0) {
|
||||
DEBUG(DEBUG_ERR,("Failed to send message to update the ip on the recovery master.\n"));
|
||||
return -1;
|
||||
@ -2066,7 +2066,7 @@ again:
|
||||
}
|
||||
|
||||
ipreallocate_finished = 0;
|
||||
ret = ctdb_send_message(ctdb, recmaster, CTDB_SRVID_TAKEOVER_RUN, data);
|
||||
ret = ctdb_client_send_message(ctdb, recmaster, CTDB_SRVID_TAKEOVER_RUN, data);
|
||||
if (ret != 0) {
|
||||
DEBUG(DEBUG_ERR,("Failed to send ip takeover run request message to %u\n", options.pnn));
|
||||
return -1;
|
||||
@ -4145,7 +4145,7 @@ static int control_rddumpmemory(struct ctdb_context *ctdb, int argc, const char
|
||||
data.dptr = (uint8_t *)&rd;
|
||||
data.dsize = sizeof(rd);
|
||||
|
||||
ret = ctdb_send_message(ctdb, options.pnn, CTDB_SRVID_MEM_DUMP, data);
|
||||
ret = ctdb_client_send_message(ctdb, options.pnn, CTDB_SRVID_MEM_DUMP, data);
|
||||
if (ret != 0) {
|
||||
DEBUG(DEBUG_ERR,("Failed to send memdump request message to %u\n", options.pnn));
|
||||
return -1;
|
||||
@ -4177,7 +4177,7 @@ static int control_msgsend(struct ctdb_context *ctdb, int argc, const char **arg
|
||||
data.dptr = (uint8_t *)discard_const(argv[1]);
|
||||
data.dsize= strlen(argv[1]);
|
||||
|
||||
ret = ctdb_send_message(ctdb, CTDB_BROADCAST_CONNECTED, srvid, data);
|
||||
ret = ctdb_client_send_message(ctdb, CTDB_BROADCAST_CONNECTED, srvid, data);
|
||||
if (ret != 0) {
|
||||
DEBUG(DEBUG_ERR,("Failed to send memdump request message to %u\n", options.pnn));
|
||||
return -1;
|
||||
|
@ -308,7 +308,7 @@ static int ctdb_vacuum_db(struct ctdb_context *ctdb, uint32_t db_id, struct ctdb
|
||||
|
||||
data.dsize = talloc_get_size(vdata->list[i]);
|
||||
data.dptr = (void *)vdata->list[i];
|
||||
if (ctdb_send_message(ctdb, ctdb->vnn_map->map[i], CTDB_SRVID_VACUUM_FETCH, data) != 0) {
|
||||
if (ctdb_client_send_message(ctdb, ctdb->vnn_map->map[i], CTDB_SRVID_VACUUM_FETCH, data) != 0) {
|
||||
DEBUG(DEBUG_ERR,(__location__ " Failed to send vacuum fetch message to %u\n",
|
||||
ctdb->vnn_map->map[i]));
|
||||
talloc_free(vdata);
|
||||
|
Loading…
x
Reference in New Issue
Block a user