-}
-
-
-
-void xmpp_xml_end(void *data, const char *supplied_el) {
- char el[256];
- char *sep = NULL;
- char xmlbuf[256];
-
- /* Axe the namespace, we don't care about it */
- safestrncpy(el, supplied_el, sizeof el);
- while (sep = strchr(el, ':'), sep) {
- strcpy(el, ++sep);
- }
-
-#ifdef XMPP_DEBUG
- syslog(LOG_DEBUG, "XMPP ELEMENT END : <%s>\n", el);
- if (XMPP->chardata_len > 0) {
- syslog(LOG_DEBUG, " chardata: %s\n", XMPP->chardata);
- }
-#endif /* XMPP_DEBUG */
-
- if (!strcasecmp(el, "resource")) {
- if (XMPP->chardata_len > 0) {
- 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) {
- 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) {
- safestrncpy(XMPP->iq_client_password, XMPP->chardata,
- sizeof XMPP->iq_client_password);
- striplt(XMPP->iq_client_password);
- }
- }
-
- else if (!strcasecmp(el, "iq")) {