101 end |
101 end |
102 |
102 |
103 function deregister_component(host) |
103 function deregister_component(host) |
104 if components[host] then |
104 if components[host] then |
105 modulemanager.unload(host, "dialback"); |
105 modulemanager.unload(host, "dialback"); |
106 host.connected = nil; |
106 hosts[host].connected = nil; |
107 local host_config = configmanager.getconfig()[host]; |
107 local host_config = configmanager.getconfig()[host]; |
108 if host_config and ((host_config.core.enabled == nil or host_config.core.enabled) and type(host_config.core.component_module) == "string") then |
108 if host_config and ((host_config.core.enabled == nil or host_config.core.enabled) and type(host_config.core.component_module) == "string") then |
109 -- Set default handler |
109 -- Set default handler |
110 components[host] = default_component_handler; |
110 components[host] = default_component_handler; |
111 else |
111 else |