s3: Consolidate server_id_self into the equivalent procid_self()
authorVolker Lendecke <vl@samba.org>
Tue, 23 Feb 2010 14:04:10 +0000 (15:04 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 23 Feb 2010 14:30:00 +0000 (15:30 +0100)
13 files changed:
source3/include/proto.h
source3/lib/util.c
source3/libsmb/dsgetdcname.c
source3/nmbd/nmbd.c
source3/smbd/server.c
source3/smbd/service.c
source3/torture/msgtest.c
source3/torture/vfstest.c
source3/utils/dbwrap_tool.c
source3/utils/dbwrap_torture.c
source3/utils/net_g_lock.c
source3/utils/smbcontrol.c
source3/winbindd/winbindd.c

index 63270e14fa48bad6b742c564247a2db20b8cfb04..ca1a38ba247508fb4e1d1e9462a99fed8b238ad3 100644 (file)
@@ -1205,7 +1205,6 @@ void set_my_vnn(uint32 vnn);
 uint32 get_my_vnn(void);
 struct server_id pid_to_procid(pid_t pid);
 struct server_id procid_self(void);
-struct server_id server_id_self(void);
 bool procid_equal(const struct server_id *p1, const struct server_id *p2);
 bool cluster_id_equal(const struct server_id *id1,
                      const struct server_id *id2);
index 932b5dbd405bf2f19b6119712b3b48f136facba8..f35a55fbed54c04c8e76eff9e529d16f823e9153 100644 (file)
@@ -2662,11 +2662,6 @@ struct server_id procid_self(void)
        return pid_to_procid(sys_getpid());
 }
 
-struct server_id server_id_self(void)
-{
-       return procid_self();
-}
-
 bool procid_equal(const struct server_id *p1, const struct server_id *p2)
 {
        if (p1->pid != p2->pid)
index 76a52c8923a07cc13a784db3fea8285466830308..00339d2d3286439db487bb587a39bc0121f070ad 100644 (file)
@@ -909,7 +909,7 @@ static struct messaging_context *msg_context(TALLOC_CTX *mem_ctx)
 {
        static struct messaging_context *ctx;
 
-       if (!ctx && !(ctx = messaging_init(mem_ctx, server_id_self(),
+       if (!ctx && !(ctx = messaging_init(mem_ctx, procid_self(),
                                           ev_context()))) {
                smb_panic("Could not init messaging context");
        }
index 148361f9f93484748d2031af7892b75c6a0ff20b..22f5b9711650bb3478438f559b1d6cd360b0c5e7 100644 (file)
@@ -53,7 +53,7 @@ struct messaging_context *nmbd_messaging_context(void)
        static struct messaging_context *ctx;
 
        if (ctx == NULL) {
-               ctx = messaging_init(NULL, server_id_self(),
+               ctx = messaging_init(NULL, procid_self(),
                                     nmbd_event_context());
        }
        if (ctx == NULL) {
index ea1ef2ef89fae0b1a52cf8e241a17c52ef5008f3..9d7de1637a03b55fccf0f3e5625a44ebe24b6c6e 100644 (file)
@@ -60,7 +60,7 @@ struct messaging_context *smbd_messaging_context(void)
 {
        if (smbd_msg_ctx == NULL) {
                smbd_msg_ctx = messaging_init(talloc_autofree_context(),
-                                             server_id_self(),
+                                             procid_self(),
                                              smbd_event_context());
        }
        if (smbd_msg_ctx == NULL) {
index 4bc5ca1a5cfd60e93d4368af648a006c8d9518d1..0452ef5e991ce80364edf5c6d9d3b9cfe9b9b056 100644 (file)
@@ -888,7 +888,7 @@ connection_struct *make_connection_snum(struct smbd_server_connection *sconn,
        on_err_call_dis_hook = true;
 
        if ((!conn->printer) && (!conn->ipc)) {
-               conn->notify_ctx = notify_init(conn, server_id_self(),
+               conn->notify_ctx = notify_init(conn, procid_self(),
                                               smbd_messaging_context(),
                                               smbd_event_context(),
                                               conn);
index c447ac63d011c5be3517631cfa94b84c167df51e..db9e5898b85483c510b9fcad1cb19c02c3cd840c 100644 (file)
@@ -53,7 +53,7 @@ static void pong_message(struct messaging_context *msg_ctx,
        lp_load(get_dyn_CONFIGFILE(),False,False,False,True);
 
        if (!(evt_ctx = tevent_context_init(NULL)) ||
-           !(msg_ctx = messaging_init(NULL, server_id_self(), evt_ctx))) {
+           !(msg_ctx = messaging_init(NULL, procid_self(), evt_ctx))) {
                fprintf(stderr, "could not init messaging context\n");
                exit(1);
        }
index 2a191c2800a2fffa0061500edb567388d37bd98b..d5237827d8e77262ba51ca74e69cb09a9717f689 100644 (file)
@@ -492,7 +492,7 @@ struct messaging_context *smbd_messaging_context(void)
 {
        static struct messaging_context *ctx;
 
-       if (!ctx && !(ctx = messaging_init(NULL, server_id_self(),
+       if (!ctx && !(ctx = messaging_init(NULL, procid_self(),
                                           smbd_event_context()))) {
                smb_panic("Could not init smbd messaging context\n");
        }
index 38b39032650dbbf858c26101e599f3d7b7c8cc94..6fbef5f131399085ff55a23b4f68c343eaeb348a 100644 (file)
@@ -298,7 +298,7 @@ int main(int argc, const char **argv)
                goto done;
        }
 
-       msg_ctx = messaging_init(mem_ctx, server_id_self(), evt_ctx);
+       msg_ctx = messaging_init(mem_ctx, procid_self(), evt_ctx);
        if (msg_ctx == NULL) {
                d_fprintf(stderr, "ERROR: could not init messaging context\n");
                goto done;
index f96b8f176c5ec0e76b60475e125a94bf1d3f3dcf..04e17946c2984fcb91bf45b90d80d80a1e6be1d3 100644 (file)
@@ -287,7 +287,7 @@ int main(int argc, const char *argv[])
                goto done;
        }
 
-       msg_ctx = messaging_init(mem_ctx, server_id_self(), ev_ctx);
+       msg_ctx = messaging_init(mem_ctx, procid_self(), ev_ctx);
        if (msg_ctx == NULL) {
                d_fprintf(stderr, "ERROR: could not init messaging context\n");
                goto done;
index f30ed331be8497c200fe563b63e4c4d21b97d7e9..7632302cea9aa4a3e09feeaaa09bc0130c8a9530 100644 (file)
@@ -35,7 +35,7 @@ static bool net_g_lock_init(TALLOC_CTX *mem_ctx,
                d_fprintf(stderr, "ERROR: could not init event context\n");
                goto fail;
        }
-       msg = messaging_init(talloc_tos(), server_id_self(), ev);
+       msg = messaging_init(talloc_tos(), procid_self(), ev);
        if (msg == NULL) {
                d_fprintf(stderr, "ERROR: could not init messaging context\n");
                goto fail;
index 4ccea26c3daf6c00034e66b854b381095dd1b202..fc6e057f1c087012870bf4658f8b4afc38b47b55 100644 (file)
@@ -1388,7 +1388,7 @@ int main(int argc, const char **argv)
          * shell needs 0. */ 
        
        if (!(evt_ctx = tevent_context_init(NULL)) ||
-           !(msg_ctx = messaging_init(NULL, server_id_self(), evt_ctx))) {
+           !(msg_ctx = messaging_init(NULL, procid_self(), evt_ctx))) {
                fprintf(stderr, "could not init messaging context\n");
                TALLOC_FREE(frame);
                exit(1);
index e4c22a610af58ecff0271231c1c1cef173a83c69..e4df27b45e6f4bd4a7f7098c00acb324a4ee7579 100644 (file)
@@ -51,7 +51,7 @@ struct messaging_context *winbind_messaging_context(void)
        static struct messaging_context *ctx;
 
        if (ctx == NULL) {
-               ctx = messaging_init(NULL, server_id_self(),
+               ctx = messaging_init(NULL, procid_self(),
                                     winbind_event_context());
        }
        if (ctx == NULL) {