* When an XMPP client closes its stream, close the server's stream and log out the...
authorArt Cancro <ajc@citadel.org>
Tue, 23 Feb 2010 04:14:48 +0000 (04:14 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 23 Feb 2010 04:14:48 +0000 (04:14 +0000)
citadel/modules/xmpp/serv_xmpp.c

index c239ee56b435991ba07dad990de16a731142829c..0ccf6861eb4b4e693d29cbda82c5a6dfa78ff453 100644 (file)
@@ -390,6 +390,12 @@ void xmpp_xml_end(void *data, const char *supplied_el) {
                XMPP->ping_requested = 1;
        }
 
+       else if (!strcasecmp(el, "stream")) {
+               CtdlLogPrintf(CTDL_DEBUG, "XMPP client shut down their stream\n");
+               cprintf("<stream>\n");
+               CC->kill_me = 1;
+       }
+
        else {
                CtdlLogPrintf(CTDL_DEBUG, "Ignoring unknown tag <%s>\n", el);
        }