diff options
author | Mohammed Rafi KC <rkavunga@redhat.com> | 2015-02-10 17:11:21 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2015-02-17 06:56:04 -0800 |
commit | eebc3c06693c324be261c994f8e74886b7715770 (patch) | |
tree | 7503375f138b3f1befd3d9e4836aceb8e590ba01 /rpc/rpc-lib/src/rpc-transport.c | |
parent | 55ce0ef667de7995c4197314153877719a7de539 (diff) |
rdma: reduce log level from E to W
glusterd process, when try to initialize default vol file, will
always through an error if there is no rdma device. Changing the
log levels and log messages to more appropriately.
Change-Id: I75b919581c6738446dd2d5bddb7b7658a91efcf4
BUG: 1188232
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Reviewed-on: http://review.gluster.org/9559
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'rpc/rpc-lib/src/rpc-transport.c')
-rw-r--r-- | rpc/rpc-lib/src/rpc-transport.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c index 266d07e99ed..f6774b72353 100644 --- a/rpc/rpc-lib/src/rpc-transport.c +++ b/rpc/rpc-lib/src/rpc-transport.c @@ -33,6 +33,31 @@ #define GF_OPTION_LIST_EMPTY(_opt) (_opt->value[0] == NULL) #endif +int32_t +rpc_transport_count (const char *transport_type) +{ + char *transport_dup = NULL; + char *saveptr = NULL; + char *ptr = NULL; + int count = 0; + + if (transport_type == NULL) + return -1; + + transport_dup = gf_strdup (transport_type); + if (transport_dup == NULL) { + return -1; + } + + ptr = strtok_r (transport_dup, ",", &saveptr); + while (ptr != NULL) { + count++; + ptr = strtok_r (NULL, ",", &saveptr); + } + + GF_FREE (transport_dup); + return count; +} int rpc_transport_get_myaddr (rpc_transport_t *this, char *peeraddr, int addrlen, @@ -329,7 +354,7 @@ rpc_transport_load (glusterfs_ctx_t *ctx, dict_t *options, char *trans_name) ret = trans->init (trans); if (ret != 0) { - gf_log ("rpc-transport", GF_LOG_ERROR, + gf_log ("rpc-transport", GF_LOG_WARNING, "'%s' initialization failed", type); goto fail; } |