X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fxmpp%2Fxmpp_presence.c;h=4c2d50ade321a9cdfe4ede9ef1d9de0bc5b5cb0f;hb=73bcf6081a14008eb1020126273f133a324bb910;hp=f42d74f40b608cd99806790747325bac90ac9453;hpb=95292a41ab037a1ff8d4b7064a674648d2c17e49;p=citadel.git diff --git a/citadel/modules/xmpp/xmpp_presence.c b/citadel/modules/xmpp/xmpp_presence.c index f42d74f40..4c2d50ade 100644 --- a/citadel/modules/xmpp/xmpp_presence.c +++ b/citadel/modules/xmpp/xmpp_presence.c @@ -67,6 +67,10 @@ void xmpp_indicate_presence(char *presence_jid) { char xmlbuf[256]; +<<<<<<< HEAD + syslog(LOG_DEBUG, "XMPP: indicating presence of <%s> to <%s>", presence_jid, XMPP->client_jid); +======= +>>>>>>> 1c0b8162b0a90f2e97028a531005c11b09441498 cprintf("", xmlesc(xmlbuf, XMPP->client_jid, sizeof xmlbuf)); } @@ -171,7 +175,7 @@ void xmpp_destroy_buddy(char *presence_jid, int aggressively) { */ void xmpp_presence_notify(char *presence_jid, int event_type) { struct CitContext *cptr; - static int unsolicited_id; + static int unsolicited_id = 12345; int visible_sessions = 0; int nContexts, i; int which_cptr_is_relevant = (-1); @@ -194,13 +198,11 @@ void xmpp_presence_notify(char *presence_jid, int event_type) { } } - syslog(LOG_DEBUG, "%d sessions for <%s> are now visible to session %d\n", - visible_sessions, presence_jid, CC->cs_pid); + syslog(LOG_DEBUG, "%d sessions for <%s> are now visible to session %d\n", visible_sessions, presence_jid, CC->cs_pid); if ( (event_type == XMPP_EVT_LOGIN) && (visible_sessions == 1) ) { - syslog(LOG_DEBUG, "Telling session %d that <%s> logged in\n", - CC->cs_pid, presence_jid); + syslog(LOG_DEBUG, "Telling session %d that <%s> logged in\n", CC->cs_pid, presence_jid); /* Do an unsolicited roster update that adds a new contact. */ assert(which_cptr_is_relevant >= 0); @@ -215,7 +217,7 @@ void xmpp_presence_notify(char *presence_jid, int event_type) { if (visible_sessions == 0) { syslog(LOG_DEBUG, "Telling session %d that <%s> logged out\n", - CC->cs_pid, presence_jid); + CC->cs_pid, presence_jid); xmpp_destroy_buddy(presence_jid, 0); /* non aggressive presence update */ } @@ -238,12 +240,12 @@ void xmpp_fetch_mortuary_backend(long msgnum, void *userdata) { /* now add anyone we find into the hashlist */ /* skip past the headers */ - ptr = strstr(msg->cm_fields['M'], "\n\n"); + ptr = strstr(msg->cm_fields[eMesageText], "\n\n"); if (ptr != NULL) { ptr += 2; } else { - ptr = strstr(msg->cm_fields['M'], "\n\r\n"); + ptr = strstr(msg->cm_fields[eMesageText], "\n\r\n"); if (ptr != NULL) { ptr += 3; } @@ -259,7 +261,7 @@ void xmpp_fetch_mortuary_backend(long msgnum, void *userdata) { } } - CtdlFreeMessage(msg); + CM_Free(msg); }