equal
deleted
inserted
replaced
178 ping_port = tonumber(ping_port); |
178 ping_port = tonumber(ping_port); |
179 else |
179 else |
180 -- Only a hostname specified, use default STUN port |
180 -- Only a hostname specified, use default STUN port |
181 ping_host, ping_port = ping_service, 3478; |
181 ping_host, ping_port = ping_service, 3478; |
182 end |
182 end |
|
183 |
|
184 if ping_host == turn_service.host then |
|
185 result.error = ("Unable to perform ping test: please supply an external STUN server address. See https://prosody.im/doc/turn#prosodyctl-check"); |
|
186 return result; |
|
187 end |
|
188 |
183 local ping_service_ip, err = socket.dns.toip(ping_host); |
189 local ping_service_ip, err = socket.dns.toip(ping_host); |
184 if not ping_service_ip then |
190 if not ping_service_ip then |
185 result.error = "Unable to resolve ping service hostname: "..err; |
191 result.error = "Unable to resolve ping service hostname: "..err; |
186 return result; |
192 return result; |
187 end |
193 end |