summaryrefslogtreecommitdiffstats
path: root/source/lib/messages.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/lib/messages.c')
-rw-r--r--source/lib/messages.c33
1 files changed, 10 insertions, 23 deletions
diff --git a/source/lib/messages.c b/source/lib/messages.c
index 8602c2f32dc..518b7d51c1e 100644
--- a/source/lib/messages.c
+++ b/source/lib/messages.c
@@ -144,9 +144,6 @@ static TDB_DATA message_key_pid(pid_t pid)
static BOOL message_notify(pid_t pid)
{
- /* Doing kill with a non-positive pid causes messages to be
- * sent to places we don't want. */
- SMB_ASSERT(pid > 0);
if (kill(pid, SIGUSR1) == -1) {
if (errno == ESRCH) {
DEBUG(2,("pid %d doesn't exist - deleting messages record\n", (int)pid));
@@ -177,10 +174,6 @@ BOOL message_send_pid(pid_t pid, int msg_type, const void *buf, size_t len,
rec.src = sys_getpid();
rec.len = len;
- /* Doing kill with a non-positive pid causes messages to be
- * sent to places we don't want. */
- SMB_ASSERT(pid > 0);
-
kbuf = message_key_pid(pid);
/* lock the record for the destination */
@@ -342,7 +335,7 @@ void message_dispatch(void)
if (!n_handled) {
DEBUG(5,("message_dispatch: warning: no handlers registed for "
"msg_type %d in pid%d\n",
- msg_type, sys_getpid()));
+ msg_type, getpid()));
}
SAFE_FREE(buf);
}
@@ -464,6 +457,8 @@ BOOL message_send_all(TDB_CONTEXT *conn_tdb, int msg_type,
return True;
}
+/** @} **/
+
static VOLATILE sig_atomic_t gotalarm;
/***************************************************************
@@ -475,13 +470,10 @@ static void gotalarm_sig(void)
gotalarm = 1;
}
-/**
- * Lock the messaging tdb based on a string - this is used as a primitive
- * form of mutex between smbd instances.
- *
- * @param name A string identifying the name of the mutex.
- */
-
+/*
+ lock the messaging tdb based on a string - this is used as a primitive form of mutex
+ between smbd instances.
+*/
BOOL message_named_mutex(char *name, unsigned int timeout)
{
TDB_DATA key;
@@ -514,12 +506,9 @@ BOOL message_named_mutex(char *name, unsigned int timeout)
return (ret == 0);
}
-/**
- * Unlock a named mutex.
- *
- * @param name A string identifying the name of the mutex.
- */
-
+/*
+ unlock a named mutex
+*/
void message_named_mutex_release(char *name)
{
TDB_DATA key;
@@ -530,5 +519,3 @@ void message_named_mutex_release(char *name)
tdb_chainunlock(tdb, key);
DEBUG(10,("message_named_mutex: released mutex for %s\n", name ));
}
-
-/** @} **/