Software /
code /
prosody
Changeset
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 |
parents | 3578:410d2df8a824 |
children | 3580:39547152bb72 |
files | plugins/mod_component.lua |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
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