X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fmodules%2Fxmpp%2Fserv_xmpp.c;h=cc75f6dd190751d88f112fa6c91035277d28c2d2;hp=20f2089e33aab30f55098115fb890e41874b2c5a;hb=5e630368347015f99043c6edbc8c1b474cf892ff;hpb=cbdfd90e8f5dae213ce649e6e02d913a45203197 diff --git a/citadel/modules/xmpp/serv_xmpp.c b/citadel/modules/xmpp/serv_xmpp.c index 20f2089e3..cc75f6dd1 100644 --- a/citadel/modules/xmpp/serv_xmpp.c +++ b/citadel/modules/xmpp/serv_xmpp.c @@ -403,9 +403,14 @@ void xmpp_xml_end(void *data, const char *supplied_el) { 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 */ @@ -415,6 +420,10 @@ void xmpp_xml_end(void *data, const char *supplied_el) { 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("", xmlesc(xmlbuf, XMPP->iq_id, sizeof xmlbuf));