s3:lib: implement serverid_equal() as macro of server_id_equal()
authorStefan Metzmacher <metze@samba.org>
Fri, 17 Aug 2012 10:45:33 +0000 (12:45 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 17 Aug 2012 18:07:07 +0000 (20:07 +0200)
metze

source3/include/proto.h
source3/include/serverid.h
source3/lib/serverid.c

index 9af72a190bf26b1f1faad92571509ef782fd8fe3..00dbab84ad673365c792b97239179f6b4a926f4f 100644 (file)
@@ -454,7 +454,7 @@ void set_my_unique_id(uint64_t unique_id);
 struct server_id pid_to_procid(pid_t pid);
 struct server_id procid_self(void);
 struct server_id *new_server_id_task(TALLOC_CTX *mem_ctx);
-bool serverid_equal(const struct server_id *p1, const struct server_id *p2);
+#define serverid_equal(p1, p2) server_id_equal(p1,p2)
 bool procid_is_me(const struct server_id *pid);
 struct server_id interpret_pid(const char *pid_string);
 char *procid_str_static(const struct server_id *pid);
index ed8d17f95a3f46b90af5ee7d042fff97e91f4b50..1833f53d559488fcd228792865dee1bd5f3cebe0 100644 (file)
@@ -75,6 +75,4 @@ bool serverid_parent_init(TALLOC_CTX *mem_ctx);
  */
 uint64_t serverid_get_random_unique_id(void);
 
-bool serverid_equal(const struct server_id *p1, const struct server_id *p2);
-
 #endif
index 3068d77a84b49626a126bf6f2b0a071207d01763..3c5402e3f3beb0c543938aaf205b543478f2ce34 100644 (file)
@@ -458,24 +458,3 @@ uint64_t serverid_get_random_unique_id(void)
 
        return unique_id;
 }
-
-bool serverid_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;
-       }
-
-       if (p1->unique_id != p2->unique_id) {
-               return false;
-       }
-
-       return true;
-}