summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-05-02 10:27:36 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-09 12:40:08 +0200
commitcc3b75b807c6dd63b6dde3b449054f6640826f7c (patch)
treed3886063e2bea4ddc8c9e112468316f078c30310 /source3/lib/util.c
parent8d803d5a0a9a7815c4e6fcbd9b7c652fb85e94dd (diff)
downloadsamba-cc3b75b807c6dd63b6dde3b449054f6640826f7c.tar.gz
samba-cc3b75b807c6dd63b6dde3b449054f6640826f7c.tar.bz2
samba-cc3b75b807c6dd63b6dde3b449054f6640826f7c.zip
s3-server_id Add task_id to server_id to match Samba4
This will allow this structure to be shared, and allow us to create a common messaging system between all Samba processes. Samba4 uses the task_id to indicate the different tasks within a single unix process. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r--source3/lib/util.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index af5f63995b..a0b6d9f55d 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1924,6 +1924,7 @@ struct server_id pid_to_procid(pid_t pid)
{
struct server_id result;
result.pid = pid;
+ result.task_id = 0;
result.unique_id = my_unique_id;
result.vnn = my_vnn;
return result;
@@ -1938,6 +1939,8 @@ bool procid_equal(const struct server_id *p1, const struct server_id *p2)
{
if (p1->pid != p2->pid)
return False;
+ if (p1->task_id != p2->task_id)
+ return False;
if (p1->vnn != p2->vnn)
return False;
return True;
@@ -1953,6 +1956,8 @@ bool procid_is_me(const struct server_id *pid)
{
if (pid->pid != sys_getpid())
return False;
+ if (pid->task_id != 0)
+ return False;
if (pid->vnn != my_vnn)
return False;
return True;