From: Volker Lendecke Date: Thu, 1 Jun 2017 17:25:48 +0000 (+0200) Subject: lib: Give messages_ctdbd.c its own header X-Git-Tag: tevent-0.9.32~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce9e92c114ef296e34017c067ed064388864309c;p=thirdparty%2Fsamba.git lib: Give messages_ctdbd.c its own header Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/include/messages.h b/source3/include/messages.h index ea89383e02d..806f7b0aadb 100644 --- a/source3/include/messages.h +++ b/source3/include/messages.h @@ -65,14 +65,6 @@ struct messaging_backend { void *private_data; }; -int messaging_ctdbd_init(struct messaging_context *msg_ctx, - TALLOC_CTX *mem_ctx, - struct messaging_backend **presult); -int messaging_ctdbd_reinit(struct messaging_context *msg_ctx, - TALLOC_CTX *mem_ctx, - struct messaging_backend *backend); -struct ctdbd_connection *messaging_ctdbd_connection(void); - struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev); NTSTATUS messaging_init_client(TALLOC_CTX *mem_ctx, diff --git a/source3/lib/ctdb_dummy.c b/source3/lib/ctdb_dummy.c index 0b1acb7dcde..2ed7b102a62 100644 --- a/source3/lib/ctdb_dummy.c +++ b/source3/lib/ctdb_dummy.c @@ -19,6 +19,7 @@ #include "includes.h" #include "messages.h" +#include "lib/messages_ctdbd.h" #include "ctdbd_conn.h" #include "lib/dbwrap/dbwrap.h" #include "lib/dbwrap/dbwrap_ctdb.h" diff --git a/source3/lib/dbwrap/dbwrap_open.c b/source3/lib/dbwrap/dbwrap_open.c index feb9f5ebea2..55e0adb7b71 100644 --- a/source3/lib/dbwrap/dbwrap_open.c +++ b/source3/lib/dbwrap/dbwrap_open.c @@ -26,6 +26,7 @@ #include "dbwrap/dbwrap_ctdb.h" #include "lib/param/param.h" #include "lib/cluster_support.h" +#include "lib/messages_ctdbd.h" #include "util_tdb.h" #include "ctdbd_conn.h" #include "messages.h" diff --git a/source3/lib/messages.c b/source3/lib/messages.c index 83def69cf54..a38f40e3345 100644 --- a/source3/lib/messages.c +++ b/source3/lib/messages.c @@ -53,6 +53,7 @@ #include "lib/util/tevent_unix.h" #include "lib/background.h" #include "lib/messages_dgm.h" +#include "lib/messages_ctdbd.h" #include "lib/util/iov_buf.h" #include "lib/util/server_id_db.h" #include "lib/messages_dgm_ref.h" diff --git a/source3/lib/messages_ctdbd.c b/source3/lib/messages_ctdbd.c index a32a80d2240..6ecec32eeba 100644 --- a/source3/lib/messages_ctdbd.c +++ b/source3/lib/messages_ctdbd.c @@ -18,6 +18,7 @@ */ #include "includes.h" +#include "lib/messages_ctdbd.h" #include "lib/util/server_id.h" #include "messages.h" #include "util_tdb.h" diff --git a/source3/lib/messages_ctdbd.h b/source3/lib/messages_ctdbd.h new file mode 100644 index 00000000000..67ec4b70090 --- /dev/null +++ b/source3/lib/messages_ctdbd.h @@ -0,0 +1,38 @@ +/* + * Unix SMB/CIFS implementation. + * messages_ctdb.c header + * Copyright (C) Volker Lendecke 2017 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef _MESSAGES_CTDB_H_ +#define _MESSAGES_CTDB_H_ + +#include "replace.h" +#include + +struct messaging_context; +struct messaging_backend; +struct ctdbd_connection; + +int messaging_ctdbd_init(struct messaging_context *msg_ctx, + TALLOC_CTX *mem_ctx, + struct messaging_backend **presult); +int messaging_ctdbd_reinit(struct messaging_context *msg_ctx, + TALLOC_CTX *mem_ctx, + struct messaging_backend *backend); +struct ctdbd_connection *messaging_ctdbd_connection(void); + +#endif diff --git a/source3/lib/serverid.c b/source3/lib/serverid.c index 7cc8b57cbc0..fb32526fa6b 100644 --- a/source3/lib/serverid.c +++ b/source3/lib/serverid.c @@ -28,6 +28,7 @@ #include "lib/param/param.h" #include "ctdbd_conn.h" #include "messages.h" +#include "lib/messages_ctdbd.h" #include "lib/messages_dgm.h" struct serverid_key { diff --git a/source3/smbd/notifyd/notifyd.h b/source3/smbd/notifyd/notifyd.h index 82fdd6e987f..6904761af8f 100644 --- a/source3/smbd/notifyd/notifyd.h +++ b/source3/smbd/notifyd/notifyd.h @@ -121,6 +121,7 @@ struct notify_event_msg { }; struct sys_notify_context; +struct ctdbd_connection; typedef int (*sys_notify_watch_fn)(TALLOC_CTX *mem_ctx, struct sys_notify_context *ctx, diff --git a/source3/smbd/notifyd/notifydd.c b/source3/smbd/notifyd/notifydd.c index 6856b3ea4f8..ad3621a942c 100644 --- a/source3/smbd/notifyd/notifydd.c +++ b/source3/smbd/notifyd/notifydd.c @@ -19,6 +19,7 @@ #include "replace.h" #include "notifyd.h" +#include "lib/messages_ctdbd.h" #include #include "lib/util/tevent_unix.h" diff --git a/source3/smbd/process.c b/source3/smbd/process.c index d5c03b94199..a19b8b78b9b 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -32,6 +32,7 @@ #include "passdb.h" #include "auth.h" #include "messages.h" +#include "lib/messages_ctdbd.h" #include "smbprofile.h" #include "rpc_server/spoolss/srv_spoolss_nt.h" #include "libsmb/libsmb.h" diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 4883c4ec510..fa13dbc9b18 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -40,6 +40,7 @@ #include "passdb.h" #include "auth.h" #include "messages.h" +#include "messages_ctdbd.h" #include "smbprofile.h" #include "lib/id_cache.h" #include "lib/param/param.h" diff --git a/source3/torture/test_dbwrap_ctdb.c b/source3/torture/test_dbwrap_ctdb.c index b9bab9eb9e6..4512358bd93 100644 --- a/source3/torture/test_dbwrap_ctdb.c +++ b/source3/torture/test_dbwrap_ctdb.c @@ -23,6 +23,7 @@ #include "lib/dbwrap/dbwrap.h" #include "lib/dbwrap/dbwrap_ctdb.h" #include "messages.h" +#include "lib/messages_ctdbd.h" bool run_local_dbwrap_ctdb(int dummy) {