]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib: Give tallocmsg.c its own header
authorVolker Lendecke <vl@samba.org>
Tue, 20 Feb 2024 12:04:28 +0000 (13:04 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 28 Mar 2024 08:05:35 +0000 (08:05 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/include/proto.h
source3/lib/messages.c
source3/lib/tallocmsg.c
source3/lib/tallocmsg.h [new file with mode: 0644]

index ed45485e65470d1f7b9bce5f5269db3a611ed982..389bb2fc935bba922bde6ec254143a639ef43494 100644 (file)
@@ -222,11 +222,6 @@ bool getgroups_unix_user(TALLOC_CTX *mem_ctx, const char *user,
                         gid_t primary_gid,
                         gid_t **ret_groups, uint32_t *p_ngroups);
 
-/* The following definitions come from lib/tallocmsg.c  */
-
-void register_msg_pool_usage(TALLOC_CTX *mem_ctx,
-                            struct messaging_context *msg_ctx);
-
 /* The following definitions come from lib/time.c  */
 
 uint32_t convert_time_t_to_uint32_t(time_t t);
index 7d3d46960a92805179d20a65948dbe31a87ae9b6..b856a2889b1f5bb750e71dd0c3c0493b01ff3b60 100644 (file)
@@ -62,6 +62,7 @@
 #include "cluster_support.h"
 #include "ctdbd_conn.h"
 #include "ctdb_srvids.h"
+#include "source3/lib/tallocmsg.h"
 
 #ifdef CLUSTER_SUPPORT
 #include "ctdb_protocol.h"
index af5a90bb434bdae78a526b17a5df37e1d3fef0b6..da05357a4dfc082c2e3b643c6b4733380d4e09d0 100644 (file)
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include "includes.h"
-#include "messages.h"
+#include "replace.h"
+#include "source3/include/messages.h"
+#include "source3/lib/tallocmsg.h"
 #include "lib/util/talloc_report_printf.h"
+#include "lib/util/debug.h"
 
 static bool pool_usage_filter(struct messaging_rec *rec, void *private_data)
 {
diff --git a/source3/lib/tallocmsg.h b/source3/lib/tallocmsg.h
new file mode 100644 (file)
index 0000000..9dd31a7
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * samba -- Unix SMB/CIFS implementation.
+ * Copyright (C) 2001, 2002 by Martin Pool
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __SOURCE3_LIB_TALLOCMSG_H__
+#define __SOURCE3_LIB_TALLOCMSG_H__
+
+#include "replace.h"
+#include <talloc.h>
+struct messaging_context;
+
+void register_msg_pool_usage(
+       TALLOC_CTX *mem_ctx, struct messaging_context *msg_ctx);
+
+#endif