1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

s3: Consolidate server_id_self into the equivalent procid_self()

This commit is contained in:
Volker Lendecke 2010-02-23 15:04:10 +01:00
parent ce7727c1cc
commit 752bffc53f
13 changed files with 11 additions and 17 deletions

View 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);

View 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)

View 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");
}

View 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) {

View 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) {

View 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);

View 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);
}

View 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");
}

View 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;

View 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;

View 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;

View 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);

View 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) {