Software / code / prosody
Comparison
core/componentmanager.lua @ 1004:0c3ea09d6d6e
componentmanager: Set host.connected = nil when deregistering a component so that we fully restore it when we reload
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sat, 18 Apr 2009 14:18:50 +0100 |
| parent | 986:ebd94ad97b75 |
| child | 1041:07835534d996 |
| child | 1064:3e945c3938ad |
comparison
equal
deleted
inserted
replaced
| 1003:afae75e37ceb | 1004:0c3ea09d6d6e |
|---|---|
| 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 local host_config = configmanager.getconfig()[host]; | 108 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 | 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 -- Set default handler | 110 -- Set default handler |
| 110 components[host] = default_component_handler; | 111 components[host] = default_component_handler; |
| 111 else | 112 else |