projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c926f2c
)
* XMPP sessions now honor the nologin flag. Resolves bug #421.
author
Art Cancro
<ajc@citadel.org>
Wed, 11 Feb 2009 01:46:19 +0000
(
01:46
+0000)
committer
Art Cancro
<ajc@citadel.org>
Wed, 11 Feb 2009 01:46:19 +0000
(
01:46
+0000)
citadel/modules/jabber/xmpp_sasl_service.c
patch
|
blob
|
history
diff --git
a/citadel/modules/jabber/xmpp_sasl_service.c
b/citadel/modules/jabber/xmpp_sasl_service.c
index 78eab97fc6dc7c2cf1a54fdb68170738f5b9e29f..6497f8101ca4db4aa405ce01437b2e39304856c6 100644
(file)
--- a/
citadel/modules/jabber/xmpp_sasl_service.c
+++ b/
citadel/modules/jabber/xmpp_sasl_service.c
@@
-118,7
+118,13
@@
void xmpp_sasl_auth(char *sasl_auth_mech, char *authstring) {
if (CC->logged_in) logout(); /* Client may try to log in twice. Handle this. */
- if (xmpp_auth_plain(authstring) == 0) {
+ if (CC->nologin) {
+ cprintf("<failure xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">");
+ cprintf("<system-shutdown/>");
+ cprintf("</failure>");
+ }
+
+ else if (xmpp_auth_plain(authstring) == 0) {
cprintf("<success xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\"/>");
}