From: Art Cancro Date: Tue, 27 Nov 2007 20:14:45 +0000 (+0000) Subject: xmpp sasl hacks X-Git-Tag: v7.86~2743 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=a0052d29ffa7a5fe10d94482958f31485e39a4e2;p=citadel.git xmpp sasl hacks --- diff --git a/citadel/modules/jabber/serv_xmpp.c b/citadel/modules/jabber/serv_xmpp.c index 8e8a9f4cc..a2a0c3643 100644 --- a/citadel/modules/jabber/serv_xmpp.c +++ b/citadel/modules/jabber/serv_xmpp.c @@ -186,6 +186,11 @@ void xmpp_xml_end(void *data, const char *supplied_el) { cprintf(""); } + else if (XMPP->iq_session) { + cprintf("", XMPP->iq_bind_id); + cprintf(""); + } + else { cprintf("", XMPP->iq_bind_id); cprintf(""); @@ -195,6 +200,7 @@ void xmpp_xml_end(void *data, const char *supplied_el) { /* Now clear these fields out so they don't get used by a future stanza */ XMPP->iq_bind_id[0] = 0; XMPP->iq_client_resource[0] = 0; + XMPP->iq_session = 1; } else if (!strcasecmp(el, "auth")) { @@ -206,6 +212,10 @@ void xmpp_xml_end(void *data, const char *supplied_el) { XMPP->sasl_auth_mech[0] = 0; } + else if (!strcasecmp(el, "session")) { + XMPP->iq_session = 1; + } + XMPP->chardata_len = 0; if (XMPP->chardata_alloc > 0) { XMPP->chardata[0] = 0; diff --git a/citadel/modules/jabber/serv_xmpp.h b/citadel/modules/jabber/serv_xmpp.h index 9898f8a7d..c5fb645c9 100644 --- a/citadel/modules/jabber/serv_xmpp.h +++ b/citadel/modules/jabber/serv_xmpp.h @@ -13,6 +13,7 @@ struct citxmpp { /* Information about the current session */ char iq_bind_id[256]; /* for stanzas */ char iq_client_resource[256]; /* resource name requested by the client */ + int iq_session; /* nonzero == client is requesting a session */ char sasl_auth_mech[32]; /* SASL auth mechanism requested by the client */ };