summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib/src/rpcsvc.c
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2010-09-22 08:14:02 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-22 08:09:28 -0700
commit0a14d255dcd6fa3e9d575bae1fecd164763104bb (patch)
tree37e5173217714309f7ffea0a86aa375ba8e12f34 /rpc/rpc-lib/src/rpcsvc.c
parent679395dc7ed5b716f3fb37886f7ec8e59ab02659 (diff)
rpc/rpcsvc: add debug messages when rpc-messages are handed over to/from transport.
Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
Diffstat (limited to 'rpc/rpc-lib/src/rpcsvc.c')
-rw-r--r--rpc/rpc-lib/src/rpcsvc.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c
index 030e23db74d..a243db17aea 100644
--- a/rpc/rpc-lib/src/rpcsvc.c
+++ b/rpc/rpc-lib/src/rpcsvc.c
@@ -879,10 +879,12 @@ rpcsvc_request_create (rpcsvc_t *svc, rpc_transport_t *trans,
ret = -1;
rpcsvc_request_init (svc, trans, &rpcmsg, progmsg, msg, req);
- gf_log (GF_RPCSVC, GF_LOG_TRACE, "RPC XID: %lx, Ver: %ld, Program: %ld,"
- " ProgVers: %ld, Proc: %ld", rpc_call_xid (&rpcmsg),
+ gf_log (GF_RPCSVC, GF_LOG_TRACE, "recieved rpc-message (XID: 0x%lx, "
+ "Ver: %ld, Program: %ld, ProgVers: %ld, Proc: %ld) from"
+ " rpc-transport (%s)", rpc_call_xid (&rpcmsg),
rpc_call_rpcvers (&rpcmsg), rpc_call_program (&rpcmsg),
- rpc_call_progver (&rpcmsg), rpc_call_progproc (&rpcmsg));
+ rpc_call_progver (&rpcmsg), rpc_call_progproc (&rpcmsg),
+ trans->name);
if (rpc_call_rpcvers (&rpcmsg) != 2) {
gf_log (GF_RPCSVC, GF_LOG_ERROR, "RPC version not supported");
@@ -1527,7 +1529,16 @@ rpcsvc_submit_generic (rpcsvc_request_t *req, struct iovec *proghdr,
req->trans_private);
if (ret == -1) {
- gf_log (GF_RPCSVC, GF_LOG_ERROR, "Failed to submit message");
+ gf_log (GF_RPCSVC, GF_LOG_ERROR, "failed to submit message "
+ "(XID: 0x%lx, Program: %s, ProgVers: %d, Proc: %d) to "
+ "rpc-transport (%s)", req->xid, req->prog->progname,
+ req->prog->progver, req->procnum, trans->name);
+ } else {
+ gf_log (GF_RPCSVC, GF_LOG_TRACE,
+ "submitted reply for rpc-message (XID: 0x%lx, "
+ "Program: %s, ProgVers: %d, Proc: %d) to rpc-transport "
+ "(%s)", req->xid, req->prog->progname,
+ req->prog->progver, req->procnum, trans->name);
}
disconnect_exit: