From 6d2eb0194d859fbc6a31ea2c5a8b4e1624070e0a Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Sat, 14 Feb 2015 17:14:43 -0500 Subject: [PATCH] fix to previous commit --- citadel/modules/xmpp/xmpp_query_namespace.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/citadel/modules/xmpp/xmpp_query_namespace.c b/citadel/modules/xmpp/xmpp_query_namespace.c index 795cd0e28..8482b4b81 100644 --- a/citadel/modules/xmpp/xmpp_query_namespace.c +++ b/citadel/modules/xmpp/xmpp_query_namespace.c @@ -79,7 +79,7 @@ void xmpp_iq_roster_query(void) int nContexts, i; syslog(LOG_DEBUG, "Roster push!"); - cprintf(""); + cprintf(""); cptr = CtdlGetContextArray(&nContexts); if (cptr) { for (i=0; iclient_jid, sizeof(dom)); // result stanza is "from" - it wants the + if (IsEmptyStr(dom)) { // same domain that the user's jid is in. + safestrncpy(dom, XMPP->server_name, sizeof(dom)); + } + char *at = strrchr(dom, '@'); + if (at) { + strcpy(dom, ++at); + } + char *slash = strchr(dom, '/'); + if (slash) { + *slash = 0; + } + if (supported_namespace) { - cprintf("server_name, sizeof xmlbuf) ); + cprintf("server_name, sizeof xmlbuf) ); + cprintf("