diff options
| author | Amar Tumballi <amar@gluster.com> | 2009-08-04 14:40:27 +0000 | 
|---|---|---|
| committer | Anand V. Avati <avati@dev.gluster.com> | 2009-08-04 16:47:48 -0700 | 
| commit | 736624b3b930ecf0848bb3631af53df9d0b66f65 (patch) | |
| tree | f42cc3229f57c32a06dd799a9b60141a76f5a8ec | |
| parent | 3641846fa58210617c28f56b9713652f1a6dd798 (diff) | |
logging related bug fix in server_lookup()
When 'dict_unserialize' failed, the log message was trying to
print 'state->loc.path' and 'state->ino', which gets filled in
later stages in flow. Caused segmentation fault when there was
a failure.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 189 (segfault in server-lookup)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=189
| -rw-r--r-- | xlators/protocol/server/src/server-protocol.c | 7 | 
1 files changed, 3 insertions, 4 deletions
diff --git a/xlators/protocol/server/src/server-protocol.c b/xlators/protocol/server/src/server-protocol.c index a7ac5be7749..cbdd48841b3 100644 --- a/xlators/protocol/server/src/server-protocol.c +++ b/xlators/protocol/server/src/server-protocol.c @@ -3474,10 +3474,9 @@ server_lookup (call_frame_t *frame, xlator_t *bound_xl,                                                  &xattr_req);  			if (ret < 0) {  				gf_log (bound_xl->name, GF_LOG_ERROR, -					"%"PRId64": %s (%"PRId64"): failed to " -					"unserialize request buffer to dictionary",  -					frame->root->unique, state->loc.path,  -					state->ino); +					"%"PRId64": failed to unserialize " +                                        "request buffer to dictionary",  +					frame->root->unique);  				free (req_dictbuf);  				goto fail;  			} else{  | 
