diff options
author | Volker Lendecke <vl@samba.org> | 2010-07-04 16:08:03 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-07-04 16:41:14 +0200 |
commit | b01958b0bdb1a7115b82fc7029d8ffe630614cff (patch) | |
tree | 46b9b2733aea40f82a7f1bf26e953e9d9d071c3e /source3/smbd | |
parent | ba57d23c1ce5ef3b6c4b2e5e100a0457b8abdcbf (diff) | |
download | samba-b01958b0bdb1a7115b82fc7029d8ffe630614cff.tar.gz samba-b01958b0bdb1a7115b82fc7029d8ffe630614cff.tar.bz2 samba-b01958b0bdb1a7115b82fc7029d8ffe630614cff.zip |
s3: Remove serverid_[de]register_self
This removes some deep references to procid_self()
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/negprot.c | 5 | ||||
-rw-r--r-- | source3/smbd/server.c | 14 | ||||
-rw-r--r-- | source3/smbd/server_exit.c | 2 |
3 files changed, 12 insertions, 9 deletions
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c index 0a928a23d6..e6fc23adee 100644 --- a/source3/smbd/negprot.c +++ b/source3/smbd/negprot.c @@ -665,8 +665,9 @@ void reply_negprot(struct smb_request *req) when the client connects to port 445. Of course there is a small window where we are listening to messages -- jerry */ - serverid_register_self(FLAG_MSG_GENERAL|FLAG_MSG_SMBD - |FLAG_MSG_PRINT_GENERAL); + serverid_register(procid_self(), + FLAG_MSG_GENERAL|FLAG_MSG_SMBD + |FLAG_MSG_PRINT_GENERAL); /* Check for protocols, most desirable first */ for (protocol = 0; supported_protocols[protocol].proto_name; protocol++) { diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 1b00f2ca4e..65db77c0b9 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -242,7 +242,7 @@ static void remove_child_pid(pid_t pid, bool unclean_shutdown) child_id = procid_self(); /* Just initialize pid and potentially vnn */ child_id.pid = pid; - if (!serverid_deregister(&child_id)) { + if (!serverid_deregister(child_id)) { DEBUG(1, ("Could not remove pid %d from serverid.tdb\n", (int)pid)); } @@ -424,9 +424,10 @@ static void smbd_accept_connection(struct tevent_context *ev, smbd_setup_sig_term_handler(); smbd_setup_sig_hup_handler(); - if (!serverid_register_self(FLAG_MSG_GENERAL|FLAG_MSG_SMBD - |FLAG_MSG_DBWRAP - |FLAG_MSG_PRINT_GENERAL)) { + if (!serverid_register(procid_self(), + FLAG_MSG_GENERAL|FLAG_MSG_SMBD + |FLAG_MSG_DBWRAP + |FLAG_MSG_PRINT_GENERAL)) { exit_server_cleanly("Could not register myself in " "serverid.tdb"); } @@ -662,8 +663,9 @@ static bool open_sockets_smbd(struct smbd_parent_context *parent, operations until it has gone thru a full startup, which includes checking to see that smbd is listening. */ - if (!serverid_register_self(FLAG_MSG_GENERAL|FLAG_MSG_SMBD - |FLAG_MSG_DBWRAP)) { + if (!serverid_register(procid_self(), + FLAG_MSG_GENERAL|FLAG_MSG_SMBD + |FLAG_MSG_DBWRAP)) { DEBUG(0, ("open_sockets_smbd: Failed to register " "myself in serverid.tdb\n")); return false; diff --git a/source3/smbd/server_exit.c b/source3/smbd/server_exit.c index b69eb4aab3..6c46a522d4 100644 --- a/source3/smbd/server_exit.c +++ b/source3/smbd/server_exit.c @@ -97,7 +97,7 @@ static void exit_server_common(enum server_exit_reason how, /* * For children the parent takes care of cleaning up */ - serverid_deregister_self(); + serverid_deregister(procid_self()); } #ifdef WITH_DFS |