Mercurial > prosody-hg
comparison core/componentmanager.lua @ 1064:3e945c3938ad
core.componentmanager: Really fix marking components as disconnected when unregistered
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Wed, 29 Apr 2009 02:06:05 +0100 |
| parents | 0c3ea09d6d6e |
| children | 0cb325970a50 266ef0c6b1d0 |
comparison
equal
deleted
inserted
replaced
| 1063:b873715ffd96 | 1064:3e945c3938ad |
|---|---|
| 102 end | 102 end |
| 103 | 103 |
| 104 function deregister_component(host) | 104 function deregister_component(host) |
| 105 if components[host] then | 105 if components[host] then |
| 106 modulemanager.unload(host, "dialback"); | 106 modulemanager.unload(host, "dialback"); |
| 107 host.connected = nil; | 107 hosts[host].connected = nil; |
| 108 local host_config = configmanager.getconfig()[host]; | 108 local host_config = configmanager.getconfig()[host]; |
| 109 if host_config and ((host_config.core.enabled == nil or host_config.core.enabled) and type(host_config.core.component_module) == "string") then | 109 if host_config and ((host_config.core.enabled == nil or host_config.core.enabled) and type(host_config.core.component_module) == "string") then |
| 110 -- Set default handler | 110 -- Set default handler |
| 111 components[host] = default_component_handler; | 111 components[host] = default_component_handler; |
| 112 else | 112 else |
