X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fxmpp%2Fserv_xmpp.c;h=1b4d78424fccba42bfb83ff2aff54dbf00131e31;hb=8e944083763c9ddcb32d763cf8f19c966d01f873;hp=6eb0fb6d1ba04a9e5804c8b1d3f06249e7669ab4;hpb=7f1677e8798d3cb77fa9860b3bd1b8e3cbd332ab;p=citadel.git diff --git a/citadel/modules/xmpp/serv_xmpp.c b/citadel/modules/xmpp/serv_xmpp.c index 6eb0fb6d1..1b4d78424 100644 --- 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 - * Copyright (c) 2007-2019 by Art Cancro and citadel.org + * Copyright (c) 2007-2021 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 @@ -53,7 +53,6 @@ #include "database.h" #include "msgbase.h" #include "internet_addressing.h" -#include "md5.h" #include "ctdl_module.h" #include "serv_xmpp.h" @@ -421,7 +420,7 @@ void xmpp_xml_end(void *data, const char *supplied_el) { } /* Generate the "full JID" of the client (user@host/resource) */ - snprintf(XMPP->client_jid, sizeof XMPP->client_jid, "%s/%s", CC->cs_inet_email, XMPP->iq_client_resource); + snprintf(XMPP->client_jid, sizeof XMPP->client_jid, "%s/%s", CC->cs_principal_id, XMPP->iq_client_resource); /* Tell the client what its JID is */ cprintf("", xmlesc(xmlbuf, XMPP->iq_id, sizeof xmlbuf)); @@ -650,7 +649,7 @@ void xmpp_async_loop(void) { * Login hook for XMPP sessions */ void xmpp_login_hook(void) { - xmpp_queue_event(XMPP_EVT_LOGIN, CC->cs_inet_email); + xmpp_queue_event(XMPP_EVT_LOGIN, CC->cs_principal_id); } @@ -658,12 +657,11 @@ void xmpp_login_hook(void) { * Logout hook for XMPP sessions */ void xmpp_logout_hook(void) { - xmpp_queue_event(XMPP_EVT_LOGOUT, CC->cs_inet_email); + xmpp_queue_event(XMPP_EVT_LOGOUT, CC->cs_principal_id); } const char *CitadelServiceXMPP="XMPP"; -extern void xmpp_cleanup_events(void); CTDL_MODULE_INIT(xmpp) { if (!threading) { @@ -679,7 +677,6 @@ CTDL_MODULE_INIT(xmpp) CtdlRegisterSessionHook(xmpp_logout_hook, EVT_LOGOUT, PRIO_LOGOUT + 90); CtdlRegisterSessionHook(xmpp_login_hook, EVT_UNSTEALTH, PRIO_UNSTEALTH + 1); CtdlRegisterSessionHook(xmpp_logout_hook, EVT_STEALTH, PRIO_STEALTH + 1); - CtdlRegisterCleanupHook(xmpp_cleanup_events); }