cprintf("</iq>");
}
+ else if (XMPP->iq_session) {
+ cprintf("<iq type=\"result\" id=\"%s\">", XMPP->iq_bind_id);
+ cprintf("</iq>");
+ }
+
else {
cprintf("<iq type=\"error\" id=\"%s\">", XMPP->iq_bind_id);
cprintf("<error></error>");
/* Now clear these fields out so they don't get used by a future stanza */
XMPP->iq_bind_id[0] = 0;
XMPP->iq_client_resource[0] = 0;
+ XMPP->iq_session = 1;
}
else if (!strcasecmp(el, "auth")) {
XMPP->sasl_auth_mech[0] = 0;
}
+ else if (!strcasecmp(el, "session")) {
+ XMPP->iq_session = 1;
+ }
+
XMPP->chardata_len = 0;
if (XMPP->chardata_alloc > 0) {
XMPP->chardata[0] = 0;
char iq_bind_id[256]; /* for <iq> stanzas */
char iq_client_resource[256]; /* resource name requested by the client */
+ int iq_session; /* nonzero == client is requesting a session */
char sasl_auth_mech[32]; /* SASL auth mechanism requested by the client */
};