summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2011-08-09 12:03:00 +0530
committerVijay Bellur <vijay@gluster.com>2011-08-08 23:49:40 -0700
commit72e1927524ed56c6006c5d48f835e7db95223b00 (patch)
tree8bd639b80f073ac158ca04e07c81720670b18978
parenta279af40f11a437fabc5b59234e677282bea246b (diff)
mgmt/glusterd: INIT_LIST at the right place during volume set help
Change-Id: I63883aa17a76a39f6d5f862ad7270f56a46e2598 BUG: 3366 Reviewed-on: http://review.gluster.com/197 Reviewed-by: Kaushik BV <kaushikbv@gluster.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 61a4852..12804e3 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -1423,7 +1423,7 @@ xml_add_volset_element (xmlTextWriterPtr writer, const char *name,
goto out;
}
- ret = xmlTextWriterWriteFormatElement(writer, (xmlChar *)"Description",
+ ret = xmlTextWriterWriteFormatElement(writer, (xmlChar *)"description",
"%s", dscrpt );
if (ret < 0) {
gf_log ("glusterd", GF_LOG_ERROR, "Could not create an "
@@ -1517,7 +1517,11 @@ glusterd_get_volopt_content (gf_boolean_t xml_out)
#if (HAVE_LIB_XML)
xmlTextWriterPtr writer = NULL;
xmlBufferPtr buf = NULL;
+#endif
+
+ INIT_LIST_HEAD (&vol_opt_handle.list);
+#if (HAVE_LIB_XML)
if (xml_out) {
ret = init_sethelp_xml_doc (&writer, &buf);
if (ret) /*logging done in init_xml_lib*/
@@ -1533,7 +1537,6 @@ glusterd_get_volopt_content (gf_boolean_t xml_out)
goto out;
}
- INIT_LIST_HEAD (&vol_opt_handle.list);
for (vme = &glusterd_volopt_map[0]; vme->key; vme++) {