lib/util Bring procid_str() into lib/util as server_id_string()
[ira/wip.git] / source3 / lib / util.c
index ca30858914139e3e154c5416e9b1bc63a1c4b4af..5fb8a41dae13004b659827951e3ea238d160a84b 100644 (file)
@@ -1987,25 +1987,9 @@ struct server_id interpret_pid(const char *pid_string)
        return result;
 }
 
-char *procid_str(TALLOC_CTX *mem_ctx, const struct server_id *pid)
-{
-       if (pid->vnn == NONCLUSTER_VNN && pid->task_id == 0) {
-               return talloc_asprintf(mem_ctx,
-                               "%llu",
-                               (unsigned long long)pid->pid);
-       }
-       else {
-               return talloc_asprintf(mem_ctx,
-                                      "%u:%llu:%u",
-                                      (unsigned)pid->vnn,
-                                      (unsigned long long)pid->pid,
-                                      (unsigned)pid->task_id);
-       }
-}
-
 char *procid_str_static(const struct server_id *pid)
 {
-       return procid_str(talloc_tos(), pid);
+       return server_id_str(talloc_tos(), pid);
 }
 
 bool procid_valid(const struct server_id *pid)