X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fxmpp%2Fserv_xmpp.c;h=c239ee56b435991ba07dad990de16a731142829c;hb=d82fe20d6fa89efc51aac93ce60577ab23bb4059;hp=0b7da46e9cf755380a2e2acb456fb9f0db4e77bd;hpb=131b59b3ca3c8368c6ad179ef7fb9cc02e99ede4;p=citadel.git
diff --git a/citadel/modules/xmpp/serv_xmpp.c b/citadel/modules/xmpp/serv_xmpp.c
index 0b7da46e9..c239ee56b 100644
--- a/citadel/modules/xmpp/serv_xmpp.c
+++ b/citadel/modules/xmpp/serv_xmpp.c
@@ -207,7 +207,7 @@ void xmpp_xml_end(void *data, const char *supplied_el) {
}
}
- if (!strcasecmp(el, "username")) { /* NON SASL ONLY */
+ else if (!strcasecmp(el, "username")) { /* NON SASL ONLY */
if (XMPP->chardata_len > 0) {
safestrncpy(XMPP->iq_client_username, XMPP->chardata,
sizeof XMPP->iq_client_username);
@@ -215,7 +215,7 @@ void xmpp_xml_end(void *data, const char *supplied_el) {
}
}
- if (!strcasecmp(el, "password")) { /* NON SASL ONLY */
+ else if (!strcasecmp(el, "password")) { /* NON SASL ONLY */
if (XMPP->chardata_len > 0) {
safestrncpy(XMPP->iq_client_password, XMPP->chardata,
sizeof XMPP->iq_client_password);
@@ -253,10 +253,13 @@ void xmpp_xml_end(void *data, const char *supplied_el) {
}
/*
- * Unknown queries ... return the XML equivalent of a blank stare
+ * Unknown query ... return the XML equivalent of a blank stare
*/
else {
- CtdlLogPrintf(CTDL_DEBUG, "Unknown query; \n");
+ CtdlLogPrintf(CTDL_DEBUG,
+ "Unknown query <%s> - returning \n",
+ el
+ );
cprintf("", XMPP->iq_id);
cprintf(""
""
@@ -374,12 +377,12 @@ void xmpp_xml_end(void *data, const char *supplied_el) {
else if (!strcasecmp(el, "starttls")) {
#ifdef HAVE_OPENSSL
- cprintf("");
- CtdlModuleStartCryptoMsgs(NULL, NULL, NULL);
- if (!CC->redirect_ssl) CC->kill_me = 1;
+ cprintf("");
+ CtdlModuleStartCryptoMsgs(NULL, NULL, NULL);
+ if (!CC->redirect_ssl) CC->kill_me = 1;
#else
- cprintf("");
- CC->kill_me = 1;
+ cprintf("");
+ CC->kill_me = 1;
#endif
}
@@ -387,6 +390,10 @@ void xmpp_xml_end(void *data, const char *supplied_el) {
XMPP->ping_requested = 1;
}
+ else {
+ CtdlLogPrintf(CTDL_DEBUG, "Ignoring unknown tag <%s>\n", el);
+ }
+
XMPP->chardata_len = 0;
if (XMPP->chardata_alloc > 0) {
XMPP->chardata[0] = 0;