struct xmpp_event *xmpp_queue = NULL;
-
#ifdef HAVE_XML_STOPPARSER
/* Stop the parser if an entity declaration is hit. */
static void xmpp_entity_declaration(void *userData, const XML_Char *entityName,
int n = 0;
unsigned char test = (1<<7);
- if ((*CharS & 0xC0) != 0xC0)
+ if ((*CharS & 0xC0) != 0xC0) {
return 1;
+ }
- while ((n < 8) &&
- ((test & ((unsigned char)*CharS)) != 0))
- {
+ while ((n < 8) && ((test & ((unsigned char)*CharS)) != 0)) {
test = test >> 1;
n ++;
}
- if ((n > 6) || ((CharE - CharS) < n))
+ if ((n > 6) || ((CharE - CharS) < n)) {
n = 0;
+ }
return n;
}
}
-
void xmpp_xml_end(void *data, const char *supplied_el) {
char el[256];
char *sep = NULL;
*
* 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.
- *
- *
- *
- *
- *
*/
#include "sysdep.h"
}
}
+
/*
* Client is sending a message.
*/
#include "serv_xmpp.h"
-
/*
* Indicate the presence of another user to the client
* (used in several places)
}
-
/*
* Convenience function to determine whether any given session is 'visible' to any other given session,
* and is capable of receiving instant messages from that session.
}
-
void xmpp_fetch_mortuary_backend(long msgnum, void *userdata) {
HashList *mortuary = (HashList *) userdata;
struct CtdlMessage *msg;
}
-
/*
* Fetch the "mortuary" - a list of dead buddies which we keep around forever
* so we can remove them from any client's roster that still has them listed
}
-
/*
* Fetch the "mortuary" - a list of dead buddies which we keep around forever
* so we can remove them from any client's roster that still has them listed
}
-
/*
* Upon logout we make an attempt to delete the whole roster, in order to
* try to keep "ghost" buddies from remaining in the client-side roster.
}
-
/*
* Stupidly, XMPP does not specify a way to tell the client to flush its client-side roster
* and prepare to receive a new one. So instead we remember every buddy we've ever told the
DeleteHash(&mortuary);
free(cptr);
}
-
}
-
/*
* Client is doing a namespace query. These are all handled differently.
*/
cprintf("</mechanisms>");
}
+
/*
* Here we go ... client is trying to authenticate.
*/
return;
}
- if (CC->logged_in) CtdlUserLogout(); /* Client may try to log in twice. Handle this. */
+ if (CC->logged_in) {
+ CtdlUserLogout(); /* Client may try to log in twice. Handle this. */
+ }
if (CC->nologin) {
cprintf("<failure xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">");
}
-
/*
* Non-SASL authentication
*/
int result;
char xmlbuf[256];
- if (CC->logged_in) CtdlUserLogout(); /* Client may try to log in twice. Handle this. */
+ if (CC->logged_in) {
+ CtdlUserLogout(); /* Client may try to log in twice. Handle this. */
+ }
result = CtdlLoginExistingUser(username);
if (result == login_ok) {