# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1359643735 -3600
# Node ID d20861bf900bd360e4ea92b47d761edf0010748e
# Parent  989acb4ad1de497456b3c6706969671890304fea
portmanager: Make sure foo_ports is a table

diff -r 989acb4ad1de -r d20861bf900b core/portmanager.lua
--- a/core/portmanager.lua	Thu Jan 31 15:33:41 2013 +0100
+++ b/core/portmanager.lua	Thu Jan 31 15:48:55 2013 +0100
@@ -89,11 +89,12 @@
 		or default_interfaces
 	bind_interfaces = set.new(type(bind_interfaces)~="table" and {bind_interfaces} or bind_interfaces);
 	
-	local bind_ports = set.new(config.get("*", config_prefix.."ports")
+	local bind_ports = config.get("*", config_prefix.."ports")
 		or service_info.default_ports
 		or {service_info.default_port
 		    or listener.default_port -- COMPAT w/pre-0.9
-		   });
+		   }
+	bind_ports = set.new(type(bind_ports) ~= "table" and { bind_ports } or bind_ports );
 
 	local mode, ssl = listener.default_mode or "*a";