mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
ctdb_conn: Use messaging_ctdb_connection
Replace messaging_ctdbd_connection Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
d1add22567
commit
af63c0b32d
source3
@ -135,7 +135,7 @@ struct messaging_ctdbd_fde *messaging_ctdbd_register_tevent_context(
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct ctdbd_connection *messaging_ctdbd_connection(void)
|
||||
struct ctdbd_connection *messaging_ctdb_connection(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include "dbwrap/dbwrap_ctdb.h"
|
||||
#include "g_lock.h"
|
||||
#include "messages.h"
|
||||
#include "messages_ctdbd.h"
|
||||
#include "messages_ctdb.h"
|
||||
#include "lib/cluster_support.h"
|
||||
#include "lib/util/tevent_ntstatus.h"
|
||||
|
||||
@ -821,7 +821,7 @@ static int db_ctdb_transaction_commit(struct db_context *db)
|
||||
|
||||
again:
|
||||
/* tell ctdbd to commit to the other nodes */
|
||||
ret = ctdbd_control_local(messaging_ctdbd_connection(),
|
||||
ret = ctdbd_control_local(messaging_ctdb_connection(),
|
||||
CTDB_CONTROL_TRANS3_COMMIT,
|
||||
h->ctx->db_id, 0,
|
||||
db_ctdb_marshall_finish(h->m_write),
|
||||
@ -938,7 +938,7 @@ static NTSTATUS db_ctdb_send_schedule_for_deletion(struct db_record *rec)
|
||||
dd->keylen = rec->key.dsize;
|
||||
memcpy(dd->key, rec->key.dptr, rec->key.dsize);
|
||||
|
||||
ret = ctdbd_control_local(messaging_ctdbd_connection(),
|
||||
ret = ctdbd_control_local(messaging_ctdb_connection(),
|
||||
CTDB_CONTROL_SCHEDULE_FOR_DELETION,
|
||||
crec->ctdb_ctx->db_id,
|
||||
CTDB_CTRL_FLAG_NOREPLY, /* flags */
|
||||
@ -1176,7 +1176,7 @@ again:
|
||||
((struct ctdb_ltdb_header *)ctdb_data.dptr)->flags : 0));
|
||||
|
||||
GetTimeOfDay(&ctdb_start_time);
|
||||
ret = ctdbd_migrate(messaging_ctdbd_connection(), ctx->db_id,
|
||||
ret = ctdbd_migrate(messaging_ctdb_connection(), ctx->db_id,
|
||||
key);
|
||||
ctdb_time += timeval_elapsed(&ctdb_start_time);
|
||||
|
||||
@ -1405,7 +1405,7 @@ static NTSTATUS db_ctdb_parse_record(struct db_context *db, TDB_DATA key,
|
||||
return status;
|
||||
}
|
||||
|
||||
ret = ctdbd_parse(messaging_ctdbd_connection(), ctx->db_id, key,
|
||||
ret = ctdbd_parse(messaging_ctdb_connection(), ctx->db_id, key,
|
||||
state.ask_for_readonly_copy, parser, private_data);
|
||||
if (ret != 0) {
|
||||
if (ret == ENOENT) {
|
||||
@ -1828,7 +1828,7 @@ struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx,
|
||||
db_ctdb->transaction = NULL;
|
||||
db_ctdb->db = result;
|
||||
|
||||
ret = ctdbd_db_attach(messaging_ctdbd_connection(), name,
|
||||
ret = ctdbd_db_attach(messaging_ctdb_connection(), name,
|
||||
&db_ctdb->db_id, persistent);
|
||||
if (ret != 0) {
|
||||
DEBUG(0, ("ctdbd_db_attach failed for %s: %s\n", name,
|
||||
@ -1841,7 +1841,7 @@ struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx,
|
||||
data.dptr = (uint8_t *)&db_ctdb->db_id;
|
||||
data.dsize = sizeof(db_ctdb->db_id);
|
||||
|
||||
ret = ctdbd_control_local(messaging_ctdbd_connection(),
|
||||
ret = ctdbd_control_local(messaging_ctdb_connection(),
|
||||
CTDB_CONTROL_ENABLE_SEQNUM,
|
||||
0, 0, data,
|
||||
NULL, NULL, &cstatus);
|
||||
@ -1853,7 +1853,7 @@ struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
}
|
||||
|
||||
db_path = ctdbd_dbpath(messaging_ctdbd_connection(), db_ctdb,
|
||||
db_path = ctdbd_dbpath(messaging_ctdb_connection(), db_ctdb,
|
||||
db_ctdb->db_id);
|
||||
|
||||
result->persistent = persistent;
|
||||
@ -1862,7 +1862,7 @@ struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx,
|
||||
data.dptr = (uint8_t *)&db_ctdb->db_id;
|
||||
data.dsize = sizeof(db_ctdb->db_id);
|
||||
|
||||
ret = ctdbd_control_local(messaging_ctdbd_connection(),
|
||||
ret = ctdbd_control_local(messaging_ctdb_connection(),
|
||||
CTDB_CONTROL_DB_OPEN_FLAGS,
|
||||
0, 0, data, NULL, &data, &cstatus);
|
||||
if (ret != 0) {
|
||||
@ -1898,7 +1898,7 @@ struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx,
|
||||
sizeof(db_ctdb->db_id));
|
||||
|
||||
ret = ctdbd_control_local(
|
||||
messaging_ctdbd_connection(),
|
||||
messaging_ctdb_connection(),
|
||||
CTDB_CONTROL_SET_DB_READONLY, 0, 0,
|
||||
indata, NULL, NULL, &cstatus);
|
||||
if ((ret != 0) || (cstatus != 0)) {
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "dbwrap/dbwrap_ctdb.h"
|
||||
#include "lib/param/param.h"
|
||||
#include "lib/cluster_support.h"
|
||||
#include "lib/messages_ctdbd.h"
|
||||
#include "lib/messages_ctdb.h"
|
||||
#include "util_tdb.h"
|
||||
#include "ctdbd_conn.h"
|
||||
#include "messages.h"
|
||||
@ -148,7 +148,7 @@ struct db_context *db_open(TALLOC_CTX *mem_ctx,
|
||||
struct messaging_context *msg_ctx;
|
||||
struct ctdbd_connection *conn;
|
||||
|
||||
conn = messaging_ctdbd_connection();
|
||||
conn = messaging_ctdb_connection();
|
||||
if (conn == NULL) {
|
||||
DBG_WARNING("No ctdb connection\n");
|
||||
errno = EIO;
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "lib/param/param.h"
|
||||
#include "ctdbd_conn.h"
|
||||
#include "messages.h"
|
||||
#include "lib/messages_ctdbd.h"
|
||||
#include "lib/messages_ctdb.h"
|
||||
#include "lib/messages_dgm.h"
|
||||
|
||||
struct serverid_key {
|
||||
@ -124,7 +124,7 @@ bool serverid_register(const struct server_id id, uint32_t msg_flags)
|
||||
}
|
||||
|
||||
if (lp_clustering()) {
|
||||
register_with_ctdbd(messaging_ctdbd_connection(), id.unique_id,
|
||||
register_with_ctdbd(messaging_ctdb_connection(), id.unique_id,
|
||||
NULL, NULL);
|
||||
}
|
||||
|
||||
@ -198,7 +198,7 @@ bool serverid_exists(const struct server_id *id)
|
||||
}
|
||||
|
||||
if (lp_clustering()) {
|
||||
return ctdbd_process_exists(messaging_ctdbd_connection(),
|
||||
return ctdbd_process_exists(messaging_ctdb_connection(),
|
||||
id->vnn, id->pid);
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#include "replace.h"
|
||||
#include "notifyd.h"
|
||||
#include "lib/messages_ctdbd.h"
|
||||
#include "lib/messages_ctdb.h"
|
||||
#include <tevent.h>
|
||||
#include "lib/util/tevent_unix.h"
|
||||
|
||||
@ -59,7 +59,7 @@ int main(int argc, const char *argv[])
|
||||
return 1;
|
||||
}
|
||||
|
||||
req = notifyd_send(ev, ev, msg, messaging_ctdbd_connection(),
|
||||
req = notifyd_send(ev, ev, msg, messaging_ctdb_connection(),
|
||||
NULL, NULL);
|
||||
if (req == NULL) {
|
||||
fprintf(stderr, "notifyd_send failed\n");
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "passdb.h"
|
||||
#include "auth.h"
|
||||
#include "messages.h"
|
||||
#include "lib/messages_ctdbd.h"
|
||||
#include "lib/messages_ctdb.h"
|
||||
#include "smbprofile.h"
|
||||
#include "rpc_server/spoolss/srv_spoolss_nt.h"
|
||||
#include "libsmb/libsmb.h"
|
||||
@ -2775,7 +2775,7 @@ static NTSTATUS smbd_register_ips(struct smbXsrv_connection *xconn,
|
||||
struct ctdbd_connection *cconn;
|
||||
int ret;
|
||||
|
||||
cconn = messaging_ctdbd_connection();
|
||||
cconn = messaging_ctdb_connection();
|
||||
if (cconn == NULL) {
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include "passdb.h"
|
||||
#include "auth.h"
|
||||
#include "messages.h"
|
||||
#include "messages_ctdbd.h"
|
||||
#include "messages_ctdb.h"
|
||||
#include "smbprofile.h"
|
||||
#include "lib/id_cache.h"
|
||||
#include "lib/param/param.h"
|
||||
@ -361,7 +361,7 @@ static struct tevent_req *notifyd_req(struct messaging_context *msg_ctx,
|
||||
}
|
||||
|
||||
if (lp_clustering()) {
|
||||
ctdbd_conn = messaging_ctdbd_connection();
|
||||
ctdbd_conn = messaging_ctdb_connection();
|
||||
}
|
||||
|
||||
req = notifyd_send(msg_ctx, ev, msg_ctx, ctdbd_conn,
|
||||
@ -1302,7 +1302,7 @@ static bool open_sockets_smbd(struct smbd_parent_context *parent,
|
||||
|
||||
#ifdef CLUSTER_SUPPORT
|
||||
if (lp_clustering()) {
|
||||
struct ctdbd_connection *conn = messaging_ctdbd_connection();
|
||||
struct ctdbd_connection *conn = messaging_ctdb_connection();
|
||||
|
||||
register_with_ctdbd(conn, CTDB_SRVID_RECONFIGURE,
|
||||
smbd_parent_ctdb_reconfigured, msg_ctx);
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "lib/dbwrap/dbwrap.h"
|
||||
#include "lib/dbwrap/dbwrap_ctdb.h"
|
||||
#include "messages.h"
|
||||
#include "lib/messages_ctdbd.h"
|
||||
#include "lib/messages_ctdb.h"
|
||||
|
||||
bool run_local_dbwrap_ctdb(int dummy)
|
||||
{
|
||||
|
@ -322,7 +322,6 @@ if bld.env.with_ctdb:
|
||||
SAMBA_CLUSTER_SUPPORT_SOURCES='''
|
||||
lib/cluster_support.c
|
||||
lib/dbwrap/dbwrap_ctdb.c
|
||||
lib/messages_ctdbd.c
|
||||
lib/messages_ctdb.c
|
||||
lib/messages_ctdb_ref.c
|
||||
lib/ctdbd_conn.c
|
||||
|
Loading…
Reference in New Issue
Block a user