summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd.c
diff options
context:
space:
mode:
authorGaurav <gaurav@gluster.com>2011-01-31 04:25:38 +0000
committerAnand V. Avati <avati@dev.gluster.com>2011-02-04 00:39:26 -0800
commit5f8e2cab86eab7f5ee5b4bb9b649376e476c740c (patch)
tree2a40f4806584dbafe1e0c2d44dbb509de28cbeb4 /xlators/mgmt/glusterd/src/glusterd.c
parentf3648c88ebc6d58a10854d564d3fc2c82290ce13 (diff)
Logging : Use of uuid_utoa and uuid_utoa_r.
Signed-off-by: Gaurav <gaurav@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 2308 (Threadsafe uuid to string conversion function) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2308
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index a0189662201..1d6517a4a72 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -44,6 +44,7 @@
#include "glusterd-op-sm.h"
#include "glusterd-store.h"
#include "glusterd-utils.h"
+#include "common-utils.h"
static uuid_t glusterd_uuid;
extern struct rpcsvc_program glusterd1_mop_prog;
@@ -73,7 +74,6 @@ static int
glusterd_uuid_init (int flag)
{
int ret = -1;
- char str[50] = {0,};
glusterd_conf_t *priv = NULL;
priv = THIS->private;
@@ -81,19 +81,17 @@ glusterd_uuid_init (int flag)
if (!flag) {
ret = glusterd_retrieve_uuid ();
if (!ret) {
- uuid_unparse (priv->uuid, str);
uuid_copy (glusterd_uuid, priv->uuid);
gf_log ("glusterd", GF_LOG_NORMAL,
- "retrieved UUID: %s", str);
+ "retrieved UUID: %s", uuid_utoa (priv->uuid));
return 0;
}
}
uuid_generate (glusterd_uuid);
- uuid_unparse (glusterd_uuid, str);
gf_log ("glusterd", GF_LOG_NORMAL,
- "generated UUID: %s",str);
+ "generated UUID: %s", uuid_utoa (glusterd_uuid));
uuid_copy (priv->uuid, glusterd_uuid);
ret = glusterd_store_uuid ();