Changeset

4546:c686860ef410

portmanager: Pass port to friendly_error_message()
author Matthew Wild <mwild1@gmail.com>
date Mon, 23 Jan 2012 00:07:15 +0000
parents 4545:c9b91ddc9c11
children 4547:d9d777e97e8f
files core/portmanager.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/core/portmanager.lua	Mon Jan 23 00:00:10 2012 +0000
+++ b/core/portmanager.lua	Mon Jan 23 00:07:15 2012 +0000
@@ -21,7 +21,7 @@
 
 --- Private helpers
 
-local function error_to_friendly_message(service_name, err)
+local function error_to_friendly_message(service_name, port, err)
 	local friendly_message = err;
 	if err:match(" in use") then
 		-- FIXME: Use service_name here
@@ -90,7 +90,7 @@
 			else
 				local handler, err = server.addserver(interface, port, listener, mode, ssl);
 				if not handler then
-					log("error", "Failed to open server port %d on %s, %s", port, interface, error_to_friendly_message(service_name, err));
+					log("error", "Failed to open server port %d on %s, %s", port, interface, error_to_friendly_message(service_name, port, err));
 				else
 					log("debug", "Added listening service %s to [%s]:%d", service_name, interface, port);
 					active_services:add(service_name, interface, port, {