diff options
author | Volker Lendecke <vl@samba.org> | 2014-08-21 18:36:33 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-08-23 00:24:18 +0200 |
commit | 46e912210d62baf895c3e526be5109724475b536 (patch) | |
tree | f0f7dd4acf3fecc7f269618f802220143dd20227 /lib/util/server_id.c | |
parent | 1c4284c7395f23cefa61a407db74cf5067aee2aa (diff) | |
download | samba-46e912210d62baf895c3e526be5109724475b536.tar.gz |
lib: Introduce server_id_same_process()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib/util/server_id.c')
-rw-r--r-- | lib/util/server_id.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/util/server_id.c b/lib/util/server_id.c index e0a05a73b83..7d3de2f9f55 100644 --- a/lib/util/server_id.c +++ b/lib/util/server_id.c @@ -20,9 +20,15 @@ #include "includes.h" #include "librpc/gen_ndr/server_id.h" +bool server_id_same_process(const struct server_id *p1, + const struct server_id *p2) +{ + return ((p1->pid == p2->pid) && (p1->vnn == p2->vnn)); +} + bool server_id_equal(const struct server_id *p1, const struct server_id *p2) { - if (p1->pid != p2->pid) { + if (!server_id_same_process(p1, p2)) { return false; } @@ -30,10 +36,6 @@ bool server_id_equal(const struct server_id *p1, const struct server_id *p2) return false; } - if (p1->vnn != p2->vnn) { - return false; - } - if (p1->unique_id != p2->unique_id) { return false; } |