X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fmodules%2Fxmpp%2Fxmpp_query_namespace.c;fp=citadel%2Fmodules%2Fxmpp%2Fxmpp_query_namespace.c;h=805b5101eaf09506ac8b4d488b85329fc5748771;hp=cf6f423a56516cd392ce78ae9c79f93d486ff2f5;hb=9530aa5d9ba02e3b186aec0c24a1fa7824b7b086;hpb=2b57abb4e89077f1bdf104e95203015810cf1a6f diff --git a/citadel/modules/xmpp/xmpp_query_namespace.c b/citadel/modules/xmpp/xmpp_query_namespace.c index cf6f423a5..805b5101e 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 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 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. - * - * - * - * + * 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" * @@ -88,7 +83,7 @@ void xmpp_iq_roster_query(void) 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 { - XMPP_syslog(LOG_DEBUG, - "Unknown query namespace '%s' - returning \n", - query_xmlns - ); + XMPP_syslog(LOG_DEBUG, "Unknown query namespace '%s' - returning \n", query_xmlns); cprintf("" "" ""