aboutsummaryrefslogtreecommitdiffstats
path: root/util/prosodyctl
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2022-03-05 16:07:47 +0000
committerMatthew Wild <mwild1@gmail.com>2022-03-05 16:07:47 +0000
commitc2af455ac030d6b26737c1de70d1147825901548 (patch)
tree4e9340dea8bd0af78517f52ad39076eb24f864d0 /util/prosodyctl
parent2320d0702172e6008b17a71ac82434620ccaced4 (diff)
downloadprosody-c2af455ac030d6b26737c1de70d1147825901548.tar.gz
prosody-c2af455ac030d6b26737c1de70d1147825901548.zip
prosodyctl: check turn: always show debug info even if test fails
Diffstat (limited to 'util/prosodyctl')
-rw-r--r--util/prosodyctl/check.lua26
1 files changed, 15 insertions, 11 deletions
diff --git a/util/prosodyctl/check.lua b/util/prosodyctl/check.lua
index 40f48051..903bada0 100644
--- a/util/prosodyctl/check.lua
+++ b/util/prosodyctl/check.lua
@@ -1253,21 +1253,25 @@ local function check(arg)
print(("%d warnings:\n\n "):format(#result.warnings));
print(table.concat(result.warnings, "\n "));
end
+
+ if opts.verbose then
+ if result.external_ip then
+ print(("External IP: %s"):format(result.external_ip.address));
+ end
+ if result.relayed_addresses then
+ for i, relayed_address in ipairs(result.relayed_addresses) do
+ print(("Relayed address %d: %s:%d"):format(i, relayed_address.address, relayed_address.port));
+ end
+ end
+ if result.external_ip_pong then
+ print(("TURN external IP: %s"):format(result.external_ip_pong.address));
+ end
+ end
+
if result.error then
print("Error: "..result.error.."\n");
ok = false;
else
- if opts.verbose then
- print(("External IP: %s"):format(result.external_ip.address));
- if result.relayed_addresses then
- for i, relayed_address in ipairs(result.relayed_addresses) do
- print(("Relayed address %d: %s:%d"):format(i, relayed_address.address, relayed_address.port));
- end
- end
- if result.external_ip_pong then
- print(("TURN external IP: %s"):format(result.external_ip_pong.address));
- end
- end
print("Success!\n");
end
end