summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib/src/rpc-clnt.c
diff options
context:
space:
mode:
authorMilind Changire <mchangir@redhat.com>2017-11-22 17:03:11 +0530
committerRaghavendra G <rgowdapp@redhat.com>2017-11-22 16:58:39 +0000
commit50a480701f4bf6885d3811e245a47d99661695d8 (patch)
treec3e4fb52830734fa3c2da0ac2edd93886941d3f8 /rpc/rpc-lib/src/rpc-clnt.c
parent8d53be68d8fb4272f0c88fef0a00dad452b941de (diff)
rpc-lib: coverity fixes
Scan URL: https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-11-10-0f524f07/html/ ID: 9 (BAD_SHIFT) ID: 58 (CHECKED_RETURN) ID: 98 (DEAD_CODE) ID: 249, 250, 251, 252 (MIXED_ENUMS) ID: 289, 297 (NULL_RETURNS) ID: 609, 613, 622, 644, 653, 655 (UNUSED_VALUE) ID: 432 (RESOURCE_LEAK) Change-Id: I2349877214dd38b789e08b74be05539f09b751b9 BUG: 789278 Signed-off-by: Milind Changire <mchangir@redhat.com>
Diffstat (limited to 'rpc/rpc-lib/src/rpc-clnt.c')
-rw-r--r--rpc/rpc-lib/src/rpc-clnt.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c
index 2fc3b38df2c..adb8e3d4a60 100644
--- a/rpc/rpc-lib/src/rpc-clnt.c
+++ b/rpc/rpc-lib/src/rpc-clnt.c
@@ -946,6 +946,11 @@ rpc_clnt_notify (rpc_transport_t *trans, void *mydata,
clnt->mydata = NULL;
ret = clnt->notifyfn (clnt, clnt_mydata,
RPC_CLNT_DESTROY, NULL);
+ if (ret < 0) {
+ gf_log (trans->name, GF_LOG_WARNING,
+ "client notify handler returned error "
+ "while handling RPC_CLNT_DESTROY");
+ }
}
rpc_clnt_destroy (clnt);
ret = 0;
@@ -1667,6 +1672,13 @@ rpc_clnt_submit (struct rpc_clnt *rpc, rpc_clnt_prog_t *prog,
if (conn->connected == 0 && !rpc->disabled) {
ret = rpc_transport_connect (conn->trans,
conn->config.remote_port);
+ if (ret < 0) {
+ gf_log (conn->name, GF_LOG_WARNING,
+ "error returned while attempting to "
+ "connect to host:%s, port:%d",
+ conn->config.remote_host,
+ conn->config.remote_port);
+ }
}
ret = rpc_transport_submit_request (conn->trans, &req);