summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client/src/client-handshake.c
diff options
context:
space:
mode:
authorManikandan Selvaganesh <mselvaga@redhat.com>2015-06-17 18:42:06 +0530
committerRaghavendra G <rgowdapp@redhat.com>2015-06-27 05:04:47 -0700
commit9ed31ab1a5718e01b22ea9e39c28759759bf023c (patch)
tree8e5184fcbd29e685cbfffa2e9e0de3d3b8b2d07b /xlators/protocol/client/src/client-handshake.c
parente28ac41c5ffc7b87f09b5bf2fe7f43cd4d4a5af5 (diff)
protocol/client : removing duplicate printing in gf_msg
Since the 3rd and 5th argument of gf_msg framework prints the error string in case of strerror(), the 5th argument is removed. Backport of http://review.gluster.org/#/c/11280/ Cherry picked from commit 4acd9d1bfc2be5179ddb611f61afaaeaa15be2cb > Change-Id: Ib1794ea2d4cb5c46a39311f0afcfd7e494540506 > BUG: 1194640 > Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> > Reviewed-on: http://review.gluster.org/11280 > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> > Reviewed-by: Vijay Bellur <vbellur@redhat.com> Change-Id: Ib1794ea2d4cb5c46a39311f0afcfd7e494540506 BUG: 1217722 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/11374 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/protocol/client/src/client-handshake.c')
-rw-r--r--xlators/protocol/client/src/client-handshake.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c
index 457fa2548a5..d45bf95fe7a 100644
--- a/xlators/protocol/client/src/client-handshake.c
+++ b/xlators/protocol/client/src/client-handshake.c
@@ -719,9 +719,9 @@ client3_3_reopen_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
if (rsp.op_ret < 0) {
- gf_msg (frame->this->name, GF_LOG_WARNING, 0,
- PC_MSG_DIR_OP_SUCCESS, "reopen on %s failed (%s)",
- local->loc.path, strerror (rsp.op_errno));
+ gf_msg (frame->this->name, GF_LOG_WARNING, rsp.op_errno,
+ PC_MSG_DIR_OP_SUCCESS, "reopen on %s failed.",
+ local->loc.path);
} else {
gf_msg_debug (frame->this->name, 0,
"reopen on %s succeeded (remote-fd = %"PRId64")",
@@ -811,9 +811,9 @@ client3_3_reopendir_cbk (struct rpc_req *req, struct iovec *iov, int count,
}
if (rsp.op_ret < 0) {
- gf_msg (frame->this->name, GF_LOG_WARNING, 0,
- PC_MSG_DIR_OP_FAILED, "reopendir on %s failed (%s)",
- local->loc.path, strerror (rsp.op_errno));
+ gf_msg (frame->this->name, GF_LOG_WARNING, rsp.op_errno,
+ PC_MSG_DIR_OP_FAILED, "reopendir on %s failed",
+ local->loc.path);
} else {
gf_msg (frame->this->name, GF_LOG_INFO, 0,
PC_MSG_DIR_OP_SUCCESS, "reopendir on %s succeeded "
@@ -1110,9 +1110,8 @@ client_setvolume_cbk (struct rpc_req *req, struct iovec *iov, int count, void *m
op_ret = rsp.op_ret;
op_errno = gf_error_to_errno (rsp.op_errno);
if (-1 == rsp.op_ret) {
- gf_msg (frame->this->name, GF_LOG_WARNING, 0,
- PC_MSG_VOL_SET_FAIL, "failed to set the volume (%s)",
- (op_errno)? strerror (op_errno) : "--");
+ gf_msg (frame->this->name, GF_LOG_WARNING, op_errno,
+ PC_MSG_VOL_SET_FAIL, "failed to set the volume");
}
reply = dict_new ();
@@ -1145,9 +1144,9 @@ client_setvolume_cbk (struct rpc_req *req, struct iovec *iov, int count, void *m
}
if (op_ret < 0) {
- gf_msg (this->name, GF_LOG_ERROR, 0, PC_MSG_SETVOLUME_FAIL,
- "SETVOLUME on remote-host failed: %s",
- remote_error ? remote_error : strerror (op_errno));
+ gf_msg (this->name, GF_LOG_ERROR, op_errno,
+ PC_MSG_SETVOLUME_FAIL,
+ "SETVOLUME on remote-host failed");
errno = op_errno;
if (remote_error &&
(strcmp ("Authentication failed", remote_error) == 0)) {