summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-02-23 15:04:10 +0100
committerVolker Lendecke <vl@samba.org>2010-02-23 15:30:00 +0100
commit752bffc53fcf296f841d62ffbf8d424f9e8e66bd (patch)
treed5139fe0fd5974d94262524112679e5cc6efd0e1 /source3
parentce7727c1cc2fe4caa9b2d6e33530c3483dd5f980 (diff)
downloadsamba-752bffc53fcf296f841d62ffbf8d424f9e8e66bd.tar.gz
samba-752bffc53fcf296f841d62ffbf8d424f9e8e66bd.tar.bz2
samba-752bffc53fcf296f841d62ffbf8d424f9e8e66bd.zip
s3: Consolidate server_id_self into the equivalent procid_self()
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/lib/util.c5
-rw-r--r--source3/libsmb/dsgetdcname.c2
-rw-r--r--source3/nmbd/nmbd.c2
-rw-r--r--source3/smbd/server.c2
-rw-r--r--source3/smbd/service.c2
-rw-r--r--source3/torture/msgtest.c2
-rw-r--r--source3/torture/vfstest.c2
-rw-r--r--source3/utils/dbwrap_tool.c2
-rw-r--r--source3/utils/dbwrap_torture.c2
-rw-r--r--source3/utils/net_g_lock.c2
-rw-r--r--source3/utils/smbcontrol.c2
-rw-r--r--source3/winbindd/winbindd.c2
13 files changed, 11 insertions, 17 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 63270e14fa..ca1a38ba24 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -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);
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 932b5dbd40..f35a55fbed 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -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)
diff --git a/source3/libsmb/dsgetdcname.c b/source3/libsmb/dsgetdcname.c
index 76a52c8923..00339d2d32 100644
--- a/source3/libsmb/dsgetdcname.c
+++ b/source3/libsmb/dsgetdcname.c
@@ -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");
}
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index 148361f9f9..22f5b97116 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -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) {
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index ea1ef2ef89..9d7de1637a 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -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) {
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index 4bc5ca1a5c..0452ef5e99 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -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);
diff --git a/source3/torture/msgtest.c b/source3/torture/msgtest.c
index c447ac63d0..db9e5898b8 100644
--- a/source3/torture/msgtest.c
+++ b/source3/torture/msgtest.c
@@ -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);
}
diff --git a/source3/torture/vfstest.c b/source3/torture/vfstest.c
index 2a191c2800..d5237827d8 100644
--- a/source3/torture/vfstest.c
+++ b/source3/torture/vfstest.c
@@ -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");
}
diff --git a/source3/utils/dbwrap_tool.c b/source3/utils/dbwrap_tool.c
index 38b3903265..6fbef5f131 100644
--- a/source3/utils/dbwrap_tool.c
+++ b/source3/utils/dbwrap_tool.c
@@ -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;
diff --git a/source3/utils/dbwrap_torture.c b/source3/utils/dbwrap_torture.c
index f96b8f176c..04e17946c2 100644
--- a/source3/utils/dbwrap_torture.c
+++ b/source3/utils/dbwrap_torture.c
@@ -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;
diff --git a/source3/utils/net_g_lock.c b/source3/utils/net_g_lock.c
index f30ed331be..7632302cea 100644
--- a/source3/utils/net_g_lock.c
+++ b/source3/utils/net_g_lock.c
@@ -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;
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c
index 4ccea26c3d..fc6e057f1c 100644
--- a/source3/utils/smbcontrol.c
+++ b/source3/utils/smbcontrol.c
@@ -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);
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index e4c22a610a..e4df27b45e 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -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) {