diff options
Diffstat (limited to 'cli')
| -rw-r--r-- | cli/src/cli3_1-cops.c | 9 | 
1 files changed, 7 insertions, 2 deletions
diff --git a/cli/src/cli3_1-cops.c b/cli/src/cli3_1-cops.c index 95ce741038a..1485e3a2ed9 100644 --- a/cli/src/cli3_1-cops.c +++ b/cli/src/cli3_1-cops.c @@ -218,8 +218,13 @@ gf_cli3_1_list_friends_cbk (struct rpc_req *req, struct iovec *iov,                          if (ret)                                  goto out; -                        cli_out ("hostname:%s, port:%d, uuid:%s, state:%d", -                                 hostname_buf, port, uuid_buf, state); +                        if (!port) { +                                cli_out ("hostname:%s, uuid:%s, state:%d", +                                         hostname_buf, uuid_buf, state); +                        } else { +                                cli_out ("hostname:%s, port:%d, uuid:%s, state:%d", +                                         hostname_buf, port, uuid_buf, state); +                        }                          i++;                  }          } else {  | 
