diff options
Diffstat (limited to 'xlators/protocol/client')
-rw-r--r-- | xlators/protocol/client/src/client.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c index 9b9873cfe85..4220afc6d66 100644 --- a/xlators/protocol/client/src/client.c +++ b/xlators/protocol/client/src/client.c @@ -1868,14 +1868,15 @@ client_priv_dump (xlator_t *this) gf_proc_dump_build_key(key, key_prefix, "last_received"); gf_proc_dump_write(key, "%s", ctime(&conf->last_received.tv_sec)); - gf_proc_dump_build_key(key, key_prefix, "total_bytes_read"); - gf_proc_dump_write(key, "%"PRIu64, - conf->rpc->conn.trans->total_bytes_read); - - gf_proc_dump_build_key(key, key_prefix, "total_bytes_written"); - gf_proc_dump_write(key, "%"PRIu64, - conf->rpc->conn.trans->total_bytes_write); + if (conf->rpc) { + gf_proc_dump_build_key(key, key_prefix, "total_bytes_read"); + gf_proc_dump_write(key, "%"PRIu64, + conf->rpc->conn.trans->total_bytes_read); + gf_proc_dump_build_key(key, key_prefix, "total_bytes_written"); + gf_proc_dump_write(key, "%"PRIu64, + conf->rpc->conn.trans->total_bytes_write); + } pthread_mutex_unlock(&conf->lock); return 0; |