Replace messaging_ctdbd_connection
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
-struct ctdbd_connection *messaging_ctdbd_connection(void)
+struct ctdbd_connection *messaging_ctdb_connection(void)
#include "dbwrap/dbwrap_ctdb.h"
#include "g_lock.h"
#include "messages.h"
#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"
#include "lib/cluster_support.h"
#include "lib/util/tevent_ntstatus.h"
again:
/* tell ctdbd to commit to the other nodes */
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),
CTDB_CONTROL_TRANS3_COMMIT,
h->ctx->db_id, 0,
db_ctdb_marshall_finish(h->m_write),
dd->keylen = rec->key.dsize;
memcpy(dd->key, rec->key.dptr, rec->key.dsize);
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 */
CTDB_CONTROL_SCHEDULE_FOR_DELETION,
crec->ctdb_ctx->db_id,
CTDB_CTRL_FLAG_NOREPLY, /* flags */
((struct ctdb_ltdb_header *)ctdb_data.dptr)->flags : 0));
GetTimeOfDay(&ctdb_start_time);
((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);
key);
ctdb_time += timeval_elapsed(&ctdb_start_time);
- 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) {
state.ask_for_readonly_copy, parser, private_data);
if (ret != 0) {
if (ret == ENOENT) {
db_ctdb->transaction = NULL;
db_ctdb->db = result;
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,
&db_ctdb->db_id, persistent);
if (ret != 0) {
DEBUG(0, ("ctdbd_db_attach failed for %s: %s\n", name,
data.dptr = (uint8_t *)&db_ctdb->db_id;
data.dsize = sizeof(db_ctdb->db_id);
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);
CTDB_CONTROL_ENABLE_SEQNUM,
0, 0, data,
NULL, NULL, &cstatus);
- 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;
db_ctdb->db_id);
result->persistent = persistent;
data.dptr = (uint8_t *)&db_ctdb->db_id;
data.dsize = sizeof(db_ctdb->db_id);
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) {
CTDB_CONTROL_DB_OPEN_FLAGS,
0, 0, data, NULL, &data, &cstatus);
if (ret != 0) {
sizeof(db_ctdb->db_id));
ret = ctdbd_control_local(
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)) {
CTDB_CONTROL_SET_DB_READONLY, 0, 0,
indata, NULL, NULL, &cstatus);
if ((ret != 0) || (cstatus != 0)) {
#include "dbwrap/dbwrap_ctdb.h"
#include "lib/param/param.h"
#include "lib/cluster_support.h"
#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"
#include "util_tdb.h"
#include "ctdbd_conn.h"
#include "messages.h"
struct messaging_context *msg_ctx;
struct ctdbd_connection *conn;
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;
if (conn == NULL) {
DBG_WARNING("No ctdb connection\n");
errno = EIO;
#include "lib/param/param.h"
#include "ctdbd_conn.h"
#include "messages.h"
#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 {
#include "lib/messages_dgm.h"
struct serverid_key {
- register_with_ctdbd(messaging_ctdbd_connection(), id.unique_id,
+ register_with_ctdbd(messaging_ctdb_connection(), id.unique_id,
- return ctdbd_process_exists(messaging_ctdbd_connection(),
+ return ctdbd_process_exists(messaging_ctdb_connection(),
#include "replace.h"
#include "notifyd.h"
#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"
#include <tevent.h>
#include "lib/util/tevent_unix.h"
- 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");
NULL, NULL);
if (req == NULL) {
fprintf(stderr, "notifyd_send failed\n");
#include "passdb.h"
#include "auth.h"
#include "messages.h"
#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"
#include "smbprofile.h"
#include "rpc_server/spoolss/srv_spoolss_nt.h"
#include "libsmb/libsmb.h"
struct ctdbd_connection *cconn;
int ret;
struct ctdbd_connection *cconn;
int ret;
- cconn = messaging_ctdbd_connection();
+ cconn = messaging_ctdb_connection();
if (cconn == NULL) {
return NT_STATUS_NO_MEMORY;
}
if (cconn == NULL) {
return NT_STATUS_NO_MEMORY;
}
#include "passdb.h"
#include "auth.h"
#include "messages.h"
#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"
#include "smbprofile.h"
#include "lib/id_cache.h"
#include "lib/param/param.h"
- ctdbd_conn = messaging_ctdbd_connection();
+ ctdbd_conn = messaging_ctdb_connection();
}
req = notifyd_send(msg_ctx, ev, msg_ctx, ctdbd_conn,
}
req = notifyd_send(msg_ctx, ev, msg_ctx, ctdbd_conn,
#ifdef CLUSTER_SUPPORT
if (lp_clustering()) {
#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);
register_with_ctdbd(conn, CTDB_SRVID_RECONFIGURE,
smbd_parent_ctdb_reconfigured, msg_ctx);
#include "lib/dbwrap/dbwrap.h"
#include "lib/dbwrap/dbwrap_ctdb.h"
#include "messages.h"
#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)
{
bool run_local_dbwrap_ctdb(int dummy)
{
SAMBA_CLUSTER_SUPPORT_SOURCES='''
lib/cluster_support.c
lib/dbwrap/dbwrap_ctdb.c
SAMBA_CLUSTER_SUPPORT_SOURCES='''
lib/cluster_support.c
lib/dbwrap/dbwrap_ctdb.c
lib/messages_ctdb.c
lib/messages_ctdb_ref.c
lib/ctdbd_conn.c
lib/messages_ctdb.c
lib/messages_ctdb_ref.c
lib/ctdbd_conn.c