diff options
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/util.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c index 5e2588e5b9..b416907c41 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -3007,11 +3007,24 @@ struct process_id procid_self(void) return pid_to_procid(sys_getpid()); } +struct server_id server_id_self(void) +{ + struct server_id id; + id.id = procid_self(); + return id; +} + BOOL procid_equal(const struct process_id *p1, const struct process_id *p2) { return (p1->pid == p2->pid); } +BOOL cluster_id_equal(const struct server_id *id1, + const struct server_id *id2) +{ + return procid_equal(&id1->id, &id2->id); +} + BOOL procid_is_me(const struct process_id *pid) { return (pid->pid == sys_getpid()); |