Software /
code /
prosody
Diff
plugins/mod_component.lua @ 3579:9720fa5e0991
mod_component: Send back a <conflict/> stream error when multiple sessions attempt to bind.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Tue, 09 Nov 2010 20:23:28 +0500 |
parent | 3540:bc139431830b |
child | 3581:3f3f8227ba76 |
line wrap: on
line diff
--- a/plugins/mod_component.lua Tue Nov 09 20:22:08 2010 +0500 +++ b/plugins/mod_component.lua Tue Nov 09 20:23:28 2010 +0500 @@ -69,6 +69,8 @@ log("info", "Component successfully registered"); else log("error", "Multiple components bound to the same address, first one wins (TODO: Implement stanza distribution)"); + session:close{ condition = "conflict", text = "Component already connected" }; + return true; end -- Signal successful authentication