else if (
(XMPP->bind_requested)
&& (!IsEmptyStr(XMPP->iq_id))
- && (!IsEmptyStr(XMPP->iq_client_resource))
&& (CC->logged_in)
- ) {
+ ) {
+
+ /* If the client has not specified a client resource, generate one */
+
+ if (IsEmptyStr(XMPP->iq_client_resource)) {
+ generate_uuid(XMPP->iq_client_resource);
+ }
/* Generate the "full JID" of the client resource */
XMPP->iq_client_resource
);
+ /* FIXME look here ... there's nothing before the slash ... wtf?
+ syslog(LOG_DEBUG, "\033[31m client resource = '%s' \033[0m", XMPP->client_jid);
+ */
+
/* Tell the client what its JID is */
cprintf("<iq type=\"result\" id=\"%s\">", xmlesc(xmlbuf, XMPP->iq_id, sizeof xmlbuf));