lib/util: let server_id_str() skip the task_id if 0 in the cluster case too
authorStefan Metzmacher <metze@samba.org>
Fri, 17 Aug 2012 10:50:09 +0000 (12:50 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 17 Aug 2012 18:07:07 +0000 (20:07 +0200)
server_id_from_string() already handles that case.

metze

lib/util/server_id.c

index d41fb0b2877da5bb2b7e1367c434abb7d66e9182..722230354c6f3020d84156e0ed40169d55f006d1 100644 (file)
@@ -52,6 +52,11 @@ char *server_id_str(TALLOC_CTX *mem_ctx, const struct server_id *id)
                                       "%llu.%u",
                                       (unsigned long long)id->pid,
                                       (unsigned)id->task_id);
+       } else if (id->task_id == 0) {
+               return talloc_asprintf(mem_ctx,
+                                      "%u:%llu",
+                                      (unsigned)id->vnn,
+                                      (unsigned long long)id->pid);
        } else {
                return talloc_asprintf(mem_ctx,
                                       "%u:%llu.%u",