Software /
code /
prosody
Diff
plugins/mod_component.lua @ 4655:9159546cb2f3
mod_component: Handle component connecting to non-existent host
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 22 Apr 2012 16:35:26 +0100 |
parent | 4650:464ca74ddf6a |
child | 4734:4d43dbd6de17 |
line wrap: on
line diff
--- a/plugins/mod_component.lua Sun Apr 22 14:54:36 2012 +0100 +++ b/plugins/mod_component.lua Sun Apr 22 16:35:26 2012 +0100 @@ -149,7 +149,7 @@ end function stream_callbacks.streamopened(session, attr) - if not hosts[attr.to].modules.component then + if not hosts[attr.to] or not hosts[attr.to].modules.component then session:close{ condition = "host-unknown", text = tostring(attr.to).." does not match any configured external components" }; return; end