From 16b1c77644217796f70a3a0bf1d95c245f9ee2d9 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 8 Jun 2011 14:05:55 +1000 Subject: lib/util Bring procid_str() into lib/util as server_id_string() This is needed for OpenChange, which prints Samba struct server_id values in debug messages. Andrew Bartlett --- source3/lib/g_lock.c | 10 +++++----- source3/lib/util.c | 18 +----------------- 2 files changed, 6 insertions(+), 22 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/g_lock.c b/source3/lib/g_lock.c index f2452919af..006ee3698c 100644 --- a/source3/lib/g_lock.c +++ b/source3/lib/g_lock.c @@ -108,7 +108,7 @@ static bool g_lock_parse(TALLOC_CTX *mem_ctx, TDB_DATA data, DEBUG(10, ("locks:\n")); for (i=0; ivnn == 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) -- cgit