summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server3_1-fops.c
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2010-10-02 01:21:35 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-10-02 00:03:35 -0700
commit26b259476421b89e2df76572c101f5a628ae1bbe (patch)
treeda7c009877d25b757bf688372fa029c77cb971be /xlators/protocol/server/src/server3_1-fops.c
parent17295c37f9ad12163f7c449dbe6f76aff90b493f (diff)
get server xattr only if name is not NULL
Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1701 (better statistics gathering in glusterd) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1701
Diffstat (limited to 'xlators/protocol/server/src/server3_1-fops.c')
-rw-r--r--xlators/protocol/server/src/server3_1-fops.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/xlators/protocol/server/src/server3_1-fops.c b/xlators/protocol/server/src/server3_1-fops.c
index aa633c6..d156e3c 100644
--- a/xlators/protocol/server/src/server3_1-fops.c
+++ b/xlators/protocol/server/src/server3_1-fops.c
@@ -3718,11 +3718,11 @@ server_getxattr (rpcsvc_request_t *req)
state->resolve.path = gf_strdup (args.path);
memcpy (state->resolve.gfid, args.gfid, 16);
- if (args.namelen)
+ if (args.namelen) {
state->name = gf_strdup (args.name);
-
- /* There can be some commands hidden in key, check and proceed */
- gf_server_check_getxattr_cmd (frame, state->name);
+ /* There can be some commands hidden in key, check and proceed */
+ gf_server_check_getxattr_cmd (frame, state->name);
+ }
resolve_and_resume (frame, server_getxattr_resume);
out: