Comparison

core/portmanager.lua @ 4902:a7c799a7a34b

portmanager: Match service against service_info (:iter() doesn't match values)
author Matthew Wild <mwild1@gmail.com>
date Tue, 22 May 2012 14:33:06 +0100
parent 4897:1a90e5225b22
child 5009:b27ba2c83dd4
comparison
equal deleted inserted replaced
4901:05ea6c1ae393 4902:a7c799a7a34b
133 log("info", "Activated service '%s'", service_name); 133 log("info", "Activated service '%s'", service_name);
134 return true; 134 return true;
135 end 135 end
136 136
137 function deactivate(service_name, service_info) 137 function deactivate(service_name, service_info)
138 for name, interface, port, active_service in active_services:iter(service_name, nil, nil, service_info) do 138 for name, interface, port, n, active_service
139 close(interface, port); 139 in active_services:iter(service_name or service_info and service_info.name, nil, nil, nil) do
140 if service_info == nil or active_service.service == service_info then
141 close(interface, port);
142 end
140 end 143 end
141 log("info", "Deactivated service '%s'", service_name or service_info.name); 144 log("info", "Deactivated service '%s'", service_name or service_info.name);
142 end 145 end
143 146
144 function register_service(service_name, service_info) 147 function register_service(service_name, service_info)