diff options
author | krishna <krishna@gluster.com> | 2011-08-20 14:32:35 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-08-20 03:54:46 -0700 |
commit | 80694bb5ff2f61cfd6e2bb7908add6c853490407 (patch) | |
tree | 378a6dee57b25cf72c2807dee327df7253dc6722 /xlators/nfs | |
parent | 64b12d90f39dd474a1a403594cf3f4598f21cd25 (diff) |
if nfs.port is not configured init the transport.socket.listen-port to GF_NFS3_PORT
Change-Id: I6c0db600ba2010b0a0272f58b16c4955b4b570f2
BUG: 3308
Reviewed-on: http://review.gluster.com/273
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/nfs')
-rw-r--r-- | xlators/nfs/server/src/nfs.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c index 40fb24eef..80bb9cebe 100644 --- a/xlators/nfs/server/src/nfs.c +++ b/xlators/nfs/server/src/nfs.c @@ -580,7 +580,11 @@ nfs_init_state (xlator_t *this) } if (dict_get(this->options, "transport.socket.listen-port") == NULL) { - ret = gf_asprintf (&optstr, "%d", nfs->override_portnum); + if (nfs->override_portnum) + ret = gf_asprintf (&optstr, "%d", + nfs->override_portnum); + else + ret = gf_asprintf (&optstr, "%d", GF_NFS3_PORT); if (ret == -1) { gf_log (GF_NFS, GF_LOG_ERROR, "failed mem-allocation"); goto free_foppool; |