projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a7d7e3f
)
80 columns is so 20 century
author
Art Cancro
<ajc@citadel.org>
Mon, 15 Oct 2018 15:58:13 +0000
(11:58 -0400)
committer
Art Cancro
<ajc@citadel.org>
Mon, 15 Oct 2018 15:58:13 +0000
(11:58 -0400)
citadel/modules/xmpp/serv_xmpp.c
patch
|
blob
|
history
diff --git
a/citadel/modules/xmpp/serv_xmpp.c
b/citadel/modules/xmpp/serv_xmpp.c
index 34c6e5d2e7c767a0c3f5cc490cd842ef13609b0b..20f2089e33aab30f55098115fb890e41874b2c5a 100644
(file)
--- a/
citadel/modules/xmpp/serv_xmpp.c
+++ b/
citadel/modules/xmpp/serv_xmpp.c
@@
-1,6
+1,6
@@
/*
* XMPP (Jabber) service for the Citadel system
/*
* XMPP (Jabber) service for the Citadel system
- * Copyright (c) 2007-201
7
by Art Cancro and citadel.org
+ * Copyright (c) 2007-201
8
by Art Cancro and citadel.org
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-68,8
+68,6
@@
struct xmpp_event *xmpp_queue = NULL;
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,
#ifdef HAVE_XML_STOPPARSER
/* Stop the parser if an entity declaration is hit. */
static void xmpp_entity_declaration(void *userData, const XML_Char *entityName,
@@
-84,7
+82,6
@@
static void xmpp_entity_declaration(void *userData, const XML_Char *entityName,
#endif
#endif
-
/*
* Given a source string and a target buffer, returns the string
* properly escaped for insertion into an XML stream. Returns a
/*
* Given a source string and a target buffer, returns the string
* properly escaped for insertion into an XML stream. Returns a
@@
-109,6
+106,7
@@
static inline int Ctdl_GetUtf8SequenceLength(const char *CharS, const char *Char
return n;
}
return n;
}
+
char *xmlesc(char *buf, char *str, int bufsiz)
{
int IsUtf8Sequence;
char *xmlesc(char *buf, char *str, int bufsiz)
{
int IsUtf8Sequence;
@@
-322,24
+320,21
@@
void xmpp_xml_end(void *data, const char *supplied_el) {
if (!strcasecmp(el, "resource")) {
if (XMPP->chardata_len > 0) {
if (!strcasecmp(el, "resource")) {
if (XMPP->chardata_len > 0) {
- safestrncpy(XMPP->iq_client_resource, XMPP->chardata,
- sizeof XMPP->iq_client_resource);
+ safestrncpy(XMPP->iq_client_resource, XMPP->chardata, sizeof XMPP->iq_client_resource);
striplt(XMPP->iq_client_resource);
}
}
else if (!strcasecmp(el, "username")) { /* NON SASL ONLY */
if (XMPP->chardata_len > 0) {
striplt(XMPP->iq_client_resource);
}
}
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);
+ safestrncpy(XMPP->iq_client_username, XMPP->chardata, sizeof XMPP->iq_client_username);
striplt(XMPP->iq_client_username);
}
}
else if (!strcasecmp(el, "password")) { /* NON SASL ONLY */
if (XMPP->chardata_len > 0) {
striplt(XMPP->iq_client_username);
}
}
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);
+ safestrncpy(XMPP->iq_client_password, XMPP->chardata, sizeof XMPP->iq_client_password);
striplt(XMPP->iq_client_password);
}
}
striplt(XMPP->iq_client_password);
}
}
@@
-355,8
+350,7
@@
void xmpp_xml_end(void *data, const char *supplied_el) {
* Query on a namespace
*/
if (!IsEmptyStr(XMPP->iq_query_xmlns)) {
* Query on a namespace
*/
if (!IsEmptyStr(XMPP->iq_query_xmlns)) {
- xmpp_query_namespace(XMPP->iq_id, XMPP->iq_from,
- XMPP->iq_to, XMPP->iq_query_xmlns);
+ xmpp_query_namespace(XMPP->iq_id, XMPP->iq_from, XMPP->iq_to, XMPP->iq_query_xmlns);
}
/*
}
/*
@@
-575,7
+569,6
@@
void xmpp_cleanup_function(void) {
}
}
-
/*
* Here's where our XMPP session begins its happy day.
*/
/*
* Here's where our XMPP session begins its happy day.
*/