# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1631576519 -7200
# Node ID 8c9ec2db1d95acdb51f4e59469cfccd45a8a4742
# Parent  ba88060fa145a7f77bc99c76266cb218e320683e
util.prosodyctl.check: Fix to not treat some options as misplaced

All 'net' providers generate a _port option which must be in the global
section, but this mistakenly also warns about these options as well.

diff -r ba88060fa145 -r 8c9ec2db1d95 util/prosodyctl/check.lua
--- a/util/prosodyctl/check.lua	Tue Sep 14 01:34:30 2021 +0200
+++ b/util/prosodyctl/check.lua	Tue Sep 14 01:41:59 2021 +0200
@@ -253,6 +253,8 @@
 					misplaced_options:add(name);
 				end
 			end
+			-- FIXME These _could_ be misplaced, but we would have to check where the corresponding module is loaded to be sure
+			misplaced_options:exclude(set.new({ "external_service_port", "turn_external_port" }));
 			if not misplaced_options:empty() then
 				ok = false;
 				print("");