From 93408f60cb6812b1aa71053836379ec7396959e6 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Fri, 28 Jun 2019 23:05:43 +1000 Subject: [PATCH] lib/messaging: Move messages_dgm out of source3 ... so CTDB can also use it. Signed-off-by: Amitay Isaacs Reviewed-by: Volker Lendecke --- {source3/lib => lib/messaging}/messages_dgm.c | 2 +- {source3/lib => lib/messaging}/messages_dgm.h | 0 {source3/lib => lib/messaging}/messages_dgm_ref.c | 0 {source3/lib => lib/messaging}/messages_dgm_ref.h | 0 lib/messaging/wscript_build | 16 ++++++++++++++++ source3/lib/messages.c | 4 ++-- source3/lib/serverid.c | 2 +- source3/lib/util.c | 2 +- source3/lib/util_procid.c | 2 +- source3/wscript_build | 15 --------------- source4/lib/messaging/messaging.c | 4 ++-- source4/lib/messaging/messaging_send.c | 4 ++-- source4/smbd/process_standard.c | 2 +- wscript_build | 1 + 14 files changed, 28 insertions(+), 26 deletions(-) rename {source3/lib => lib/messaging}/messages_dgm.c (99%) rename {source3/lib => lib/messaging}/messages_dgm.h (100%) rename {source3/lib => lib/messaging}/messages_dgm_ref.c (100%) rename {source3/lib => lib/messaging}/messages_dgm_ref.h (100%) create mode 100644 lib/messaging/wscript_build diff --git a/source3/lib/messages_dgm.c b/lib/messaging/messages_dgm.c similarity index 99% rename from source3/lib/messages_dgm.c rename to lib/messaging/messages_dgm.c index 661e032b908..b7126b9c8ca 100644 --- a/source3/lib/messages_dgm.c +++ b/lib/messaging/messages_dgm.c @@ -24,7 +24,7 @@ #include "system/dir.h" #include "system/select.h" #include "lib/util/debug.h" -#include "lib/messages_dgm.h" +#include "messages_dgm.h" #include "lib/util/genrand.h" #include "lib/util/dlinklist.h" #include "lib/pthreadpool/pthreadpool_tevent.h" diff --git a/source3/lib/messages_dgm.h b/lib/messaging/messages_dgm.h similarity index 100% rename from source3/lib/messages_dgm.h rename to lib/messaging/messages_dgm.h diff --git a/source3/lib/messages_dgm_ref.c b/lib/messaging/messages_dgm_ref.c similarity index 100% rename from source3/lib/messages_dgm_ref.c rename to lib/messaging/messages_dgm_ref.c diff --git a/source3/lib/messages_dgm_ref.h b/lib/messaging/messages_dgm_ref.h similarity index 100% rename from source3/lib/messages_dgm_ref.h rename to lib/messaging/messages_dgm_ref.h diff --git a/lib/messaging/wscript_build b/lib/messaging/wscript_build new file mode 100644 index 00000000000..e22a60d17da --- /dev/null +++ b/lib/messaging/wscript_build @@ -0,0 +1,16 @@ +#!/usr/bin/env python + +bld.SAMBA_LIBRARY('messages_dgm', + source=''' + messages_dgm.c + messages_dgm_ref.c + ''', + deps=''' + talloc + samba-debug + PTHREADPOOL + msghdr + genrand + samba-util + ''', + private_library=True) diff --git a/source3/lib/messages.c b/source3/lib/messages.c index 4e301651117..c63b027c617 100644 --- a/source3/lib/messages.c +++ b/source3/lib/messages.c @@ -52,10 +52,10 @@ #include "messages.h" #include "lib/util/tevent_unix.h" #include "lib/background.h" -#include "lib/messages_dgm.h" +#include "lib/messaging/messages_dgm.h" #include "lib/util/iov_buf.h" #include "lib/util/server_id_db.h" -#include "lib/messages_dgm_ref.h" +#include "lib/messaging/messages_dgm_ref.h" #include "lib/messages_ctdb.h" #include "lib/messages_ctdb_ref.h" #include "lib/messages_util.h" diff --git a/source3/lib/serverid.c b/source3/lib/serverid.c index b4125cb9142..70739c79d2f 100644 --- a/source3/lib/serverid.c +++ b/source3/lib/serverid.c @@ -23,7 +23,7 @@ #include "lib/param/param.h" #include "ctdbd_conn.h" #include "lib/messages_ctdb.h" -#include "lib/messages_dgm.h" +#include "lib/messaging/messages_dgm.h" static bool serverid_exists_local(const struct server_id *id) { diff --git a/source3/lib/util.c b/source3/lib/util.c index 4d5f611ac82..6aa551176ed 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -29,7 +29,7 @@ #include "ctdbd_conn.h" #include "../lib/util/util_pw.h" #include "messages.h" -#include "messages_dgm.h" +#include "lib/messaging/messages_dgm.h" #include "libcli/security/security.h" #include "serverid.h" #include "lib/util/sys_rw.h" diff --git a/source3/lib/util_procid.c b/source3/lib/util_procid.c index 0ae99ccea9f..5a4c081986a 100644 --- a/source3/lib/util_procid.c +++ b/source3/lib/util_procid.c @@ -23,7 +23,7 @@ #include "util_procid.h" #include "lib/util/debug.h" -#include "lib/messages_dgm.h" +#include "lib/messaging/messages_dgm.h" pid_t procid_to_pid(const struct server_id *proc) { diff --git a/source3/wscript_build b/source3/wscript_build index 93e58a4c9f0..ac442ca3410 100644 --- a/source3/wscript_build +++ b/source3/wscript_build @@ -360,21 +360,6 @@ bld.SAMBA3_SUBSYSTEM('TDB_LIB', samba-cluster-support ''') -bld.SAMBA3_LIBRARY('messages_dgm', - source=''' - lib/messages_dgm.c - lib/messages_dgm_ref.c - ''', - deps=''' - talloc - samba-debug - PTHREADPOOL - msghdr - genrand - samba-util - ''', - private_library=True) - bld.SAMBA3_LIBRARY('messages_util', source='''lib/messages_util.c''', deps='samba-util', diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index ec7f5f7bad7..a00c35be0d5 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -36,8 +36,8 @@ #include "lib/param/param.h" #include "lib/util/server_id_db.h" #include "lib/util/talloc_report_printf.h" -#include "../source3/lib/messages_dgm.h" -#include "../source3/lib/messages_dgm_ref.h" +#include "lib/messaging/messages_dgm.h" +#include "lib/messaging/messages_dgm_ref.h" #include "../source3/lib/messages_util.h" #include diff --git a/source4/lib/messaging/messaging_send.c b/source4/lib/messaging/messaging_send.c index a4f828186c9..24cdce3c90a 100644 --- a/source4/lib/messaging/messaging_send.c +++ b/source4/lib/messaging/messaging_send.c @@ -22,8 +22,8 @@ #include "includes.h" #include "messaging/messaging.h" #include "messaging/irpc.h" -#include "../source3/lib/messages_dgm.h" -#include "../source3/lib/messages_dgm_ref.h" +#include "lib/messaging/messages_dgm.h" +#include "lib/messaging/messages_dgm_ref.h" #include "../source3/lib/messages_util.h" #include "messaging/messaging_internal.h" #include "lib/util/server_id_db.h" diff --git a/source4/smbd/process_standard.c b/source4/smbd/process_standard.c index e0a3536f638..5e804807c93 100644 --- a/source4/smbd/process_standard.c +++ b/source4/smbd/process_standard.c @@ -30,7 +30,7 @@ #include "ldb_wrap.h" #include "lib/messaging/messaging.h" #include "lib/util/debug.h" -#include "source3/lib/messages_dgm.h" +#include "lib/messaging/messages_dgm.h" #include "lib/util/util_process.h" static unsigned connections_active = 0; diff --git a/wscript_build b/wscript_build index b2e32987acb..3ae92e40542 100644 --- a/wscript_build +++ b/wscript_build @@ -53,6 +53,7 @@ bld.RECURSE('lib/ldb') bld.RECURSE('lib/param') bld.RECURSE('lib/printer_driver') bld.RECURSE('lib/audit_logging') +bld.RECURSE('lib/messaging') bld.RECURSE('dynconfig') bld.RECURSE('lib/util/charset') bld.RECURSE('python') -- 2.11.4.GIT