diff options
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.c | 24 | ||||
-rw-r--r-- | xlators/nfs/server/src/nfs.c | 7 |
2 files changed, 27 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index 1c0d1c11d39..61a485202c8 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -1332,6 +1332,16 @@ end_sethelp_xml_doc (xmlTextWriterPtr writer) ret = -1; goto out; } + + ret = xmlTextWriterFlush (writer); + if (ret < 0) { + gf_log ("glusterd", GF_LOG_ERROR, "Could not flush an " + "xmlDocument"); + ret = -1; + goto out; + } + + ret = 0; out: gf_log ("glusterd", GF_LOG_DEBUG, "Returning %d", ret); @@ -1492,7 +1502,9 @@ glusterd_get_volopt_content (gf_boolean_t xml_out) char *xlator_type = NULL; void *dl_handle = NULL; - volume_opt_list_t vol_opt_handle; + volume_opt_list_t vol_opt_handle; + volume_opt_list_t *vol_opt = NULL; + volume_opt_list_t *tmp = NULL; char *key = NULL; struct volopt_map_entry *vme = NULL; int ret = -1; @@ -1521,6 +1533,8 @@ 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++) { if ( ( vme->type == NO_DOC) || (vme->type == GLOBAL_NO_DOC) ) @@ -1572,6 +1586,9 @@ glusterd_get_volopt_content (gf_boolean_t xml_out) else #if (HAVE_LIB_XML) output = gf_strdup ((char *)buf->content); + xmlFreeTextWriter (writer); + xmlBufferFree (buf); + #else gf_log ("glusterd", GF_LOG_ERROR, "Libxml not present"); #endif @@ -1583,6 +1600,11 @@ glusterd_get_volopt_content (gf_boolean_t xml_out) ret = dict_set_dynstr (ctx, "help-str", output); out: + list_for_each_entry_safe (vol_opt, tmp, &vol_opt_handle.list, list) { + list_del_init (&vol_opt->list); + GF_FREE (vol_opt); + } + gf_log ("glusterd", GF_LOG_DEBUG, "Returning %d", ret); return ret; diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c index 97a33531b1f..699b0f441e3 100644 --- a/xlators/nfs/server/src/nfs.c +++ b/xlators/nfs/server/src/nfs.c @@ -827,7 +827,7 @@ struct volume_options options[] = { .description = "All writes and COMMIT requests are treated as async." " This implies that no write requests are guaranteed" " to be on server disks when the write reply is " - "received at the NFS client. Trusted sync includes " + "received at the NFS client. Trusted sync includes" " trusted-write behaviour. Off by default." }, @@ -887,6 +887,7 @@ struct volume_options options[] = { }, { .key = {"rpc-auth.auth-null.*"}, .type = GF_OPTION_TYPE_BOOL, + .default_value = "", .description = "Disable or enable the AUTH_NULL authentication type " "for a particular exported volume over-riding defaults" " and general setting for AUTH_NULL. Must always be " @@ -907,7 +908,7 @@ struct volume_options options[] = { .description = "Reject a comma separated list of addresses and/or" " hostnames from connecting to the server. By default," " all connections are disallowed. This allows users to" - "define a general rule for all exported volumes." + " define a general rule for all exported volumes." }, { .key = {"rpc-auth.addr.*.allow"}, .type = GF_OPTION_TYPE_STR, @@ -923,7 +924,7 @@ struct volume_options options[] = { .description = "Reject a comma separated list of addresses and/or" " hostnames from connecting to the server. By default," " all connections are disallowed. This allows users to" - "define a rule for a specific exported volume." + " define a rule for a specific exported volume." }, { .key = {"rpc-auth.ports.insecure"}, .type = GF_OPTION_TYPE_BOOL, |