mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 05:37:39 +03:00
prosodyctl: check turn: always show debug info even if test fails
This commit is contained in:
parent
2320d07021
commit
c2af455ac0
1 changed files with 15 additions and 11 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue