summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlan Antonuk <alan.antonuk@gmail.com>2020-08-09 06:44:28 +0000
committerAlan Antonuk <alan.antonuk@gmail.com>2020-08-09 00:06:57 -0700
commit4d03c849868231dc217785c6f0e78eab9cd79fd5 (patch)
tree8303477883d689f804dfc75cddb03441e36de16a /tools
parent637f0275ffcc2bfb58c94f0bf6e290aa40c1695a (diff)
downloadrabbitmq-c-4d03c849868231dc217785c6f0e78eab9cd79fd5.tar.gz
tool: fix issue parsing hostname in --server flag
Set both the host and port when a ':' isn't found in in the --server flag. The attempted fix in #622 was not complete as the host was not properly set. Fixes #621
Diffstat (limited to 'tools')
-rw-r--r--tools/common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/common.c b/tools/common.c
index 39c49b1..53ea788 100644
--- a/tools/common.c
+++ b/tools/common.c
@@ -241,6 +241,7 @@ static void init_connection_info(struct amqp_connection_info *ci) {
*port_end != 0)
die("bad server port number in '%s'", amqp_server);
} else {
+ ci->host = amqp_server;
ci->port = 5672;
#if WITH_SSL
if (amqp_ssl) {