X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fxmpp%2Fxmpp_query_namespace.c;h=fba04f75f0408ac02ef210b34e132bc72029bd70;hb=164b2f28587681f406dd12dbc4a3c82e70775726;hp=ee83d98eca0a8ddcf2b8b627a285f89088bd6c71;hpb=1584426db07095ea60e782c96a74128880b04d3a;p=citadel.git diff --git a/citadel/modules/xmpp/xmpp_query_namespace.c b/citadel/modules/xmpp/xmpp_query_namespace.c index ee83d98ec..fba04f75f 100644 --- a/citadel/modules/xmpp/xmpp_query_namespace.c +++ b/citadel/modules/xmpp/xmpp_query_namespace.c @@ -3,19 +3,13 @@ * * Copyright (c) 2007-2009 by Art Cancro * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This program is open source software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include "sysdep.h" @@ -71,6 +65,7 @@ void xmpp_roster_item(struct CitContext *cptr) { cprintf(""); } + /* * Return the results for a "jabber:iq:roster:query" * @@ -83,12 +78,13 @@ void xmpp_iq_roster_query(void) struct CitContext *cptr; int nContexts, i; + syslog(LOG_DEBUG, "Roster push!"); cprintf(""); cptr = CtdlGetContextArray(&nContexts); if (cptr) { for (i=0; i", xmlesc(xmlbuf, query_xmlns, sizeof xmlbuf)); + } + + // Extension "xep-0030" (http://xmpp.org/extensions/xep-0030.html) (return an empty set of results) + else if (!strcasecmp(query_xmlns, "http://jabber.org/protocol/disco#info:query")) { + cprintf("", xmlesc(xmlbuf, query_xmlns, sizeof xmlbuf)); + } + /* * If we didn't hit any known query namespaces then we should deliver a * "service unavailable" error (see RFC3921 section 2.4 and 11.1.5.4) */ else { - CtdlLogPrintf(CTDL_DEBUG, - "Unknown query namespace '%s' - returning \n", - query_xmlns - ); + XMPP_syslog(LOG_DEBUG, "Unknown query namespace '%s' - returning \n", query_xmlns); cprintf("" "" ""