From: Art Cancro Date: Tue, 27 Nov 2007 18:06:25 +0000 (+0000) Subject: Added SASL PLAIN auth to jabber service. X-Git-Tag: v7.86~2745 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=819e7c3f544873fae924be72f2faeb1abac42e58;p=citadel.git Added SASL PLAIN auth to jabber service. --- diff --git a/citadel/modules/jabber/serv_xmpp.c b/citadel/modules/jabber/serv_xmpp.c index 5569211fa..8e8a9f4cc 100644 --- a/citadel/modules/jabber/serv_xmpp.c +++ b/citadel/modules/jabber/serv_xmpp.c @@ -59,8 +59,6 @@ void xmpp_stream_start(void *data, const char *supplied_el, const char **attr) lprintf(CTDL_DEBUG, "New stream detected.\n"); - if (CC->logged_in) logout(CC); /* Client may try to log in twice. Handle this. */ - while (*attr) { if (!strcasecmp(attr[0], "to")) { safestrncpy(XMPP->server_name, attr[1], sizeof XMPP->server_name); diff --git a/citadel/modules/jabber/xmpp_sasl_service.c b/citadel/modules/jabber/xmpp_sasl_service.c index 2f05783f7..9e9aef6ff 100644 --- a/citadel/modules/jabber/xmpp_sasl_service.c +++ b/citadel/modules/jabber/xmpp_sasl_service.c @@ -106,6 +106,8 @@ void xmpp_sasl_auth(char *sasl_auth_mech, char *authstring) { return; } + if (CC->logged_in) logout(CC); /* Client may try to log in twice. Handle this. */ + if (xmpp_auth_plain(authstring) == 0) { cprintf(""); }