hostmanager: activate() now gets the host config from configmanager when a config isn't given.

Thu, 09 Dec 2010 21:11:12 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Thu, 09 Dec 2010 21:11:12 +0500
changeset 3715
d7574530572c
parent 3714
f18515d2d10b
child 3716
ebb2c6209e24

hostmanager: activate() now gets the host config from configmanager when a config isn't given.

core/hostmanager.lua file | annotate | diff | comparison | revisions
--- a/core/hostmanager.lua	Wed Dec 08 17:01:23 2010 +0000
+++ b/core/hostmanager.lua	Thu Dec 09 21:11:12 2010 +0500
@@ -54,6 +54,7 @@
 
 function activate(host, host_config)
 	if hosts[host] then return nil, "host-already-exists"; end
+	host_config = host_config or configmanager.getconfig()[host];
 	local host_session = {
 		host = host;
 		s2sout = {};

mercurial