From bfb210629f62e6d6ef588a500bef46808476c2c6 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 28 Apr 2010 17:03:55 +0000 Subject: [PATCH] * Reenabled the XMPP mortuary. If there's still a bug in this I need to find it. --- citadel/modules/xmpp/serv_xmpp.c | 2 +- citadel/modules/xmpp/xmpp_presence.c | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/citadel/modules/xmpp/serv_xmpp.c b/citadel/modules/xmpp/serv_xmpp.c index 977b6dea4..093e80b57 100644 --- a/citadel/modules/xmpp/serv_xmpp.c +++ b/citadel/modules/xmpp/serv_xmpp.c @@ -391,7 +391,7 @@ void xmpp_xml_end(void *data, const char *supplied_el) { else if (!strcasecmp(el, "stream")) { CtdlLogPrintf(CTDL_DEBUG, "XMPP client shut down their stream\n"); - /* xmpp_massacre_roster(); FIXME put this back in when it's finished */ + xmpp_massacre_roster(); cprintf("\n"); CC->kill_me = 1; } diff --git a/citadel/modules/xmpp/xmpp_presence.c b/citadel/modules/xmpp/xmpp_presence.c index fd1a737ed..c2c1af5cf 100644 --- a/citadel/modules/xmpp/xmpp_presence.c +++ b/citadel/modules/xmpp/xmpp_presence.c @@ -209,7 +209,6 @@ void xmpp_fetch_mortuary_backend(long msgnum, void *userdata) { int in_body = 0; char buf[256]; - CtdlLogPrintf(CTDL_DEBUG, "\033[32m%d\033[0m\n", msgnum); msg = CtdlFetchMessage(msgnum, 1); if (msg == NULL) { return; @@ -220,7 +219,6 @@ void xmpp_fetch_mortuary_backend(long msgnum, void *userdata) { ptr = msg->cm_fields['M']; endptr = ptr + strlen(ptr); // only do strlen once :) while (ptr = memreadline(ptr, buf, (sizeof buf - 2)), ((ptr < endptr) && (*ptr != 0)) ) { - CtdlLogPrintf(CTDL_DEBUG, "%3d \033[31m%s\033[0m\n", in_body, buf); if (in_body) { Put(mortuary, buf, strlen(buf), buf, generic_free_handler); } @@ -276,7 +274,6 @@ void xmpp_store_mortuary(HashList *mortuary) { while (GetNextHashPos(mortuary, HashPos, &len, &Key, &Value) != 0) { StrBufAppendPrintf(themsg, "%s\n", (char *)Value); - /* note: don't free(Value) -- deleting the hash list will handle this for us */ } DeleteHashPos(&HashPos); @@ -284,7 +281,6 @@ void xmpp_store_mortuary(HashList *mortuary) { CtdlDeleteMessages(USERCONFIGROOM, NULL, 0, XMPPMORTUARY); /* And save the new one to disk */ - CtdlLogPrintf(CTDL_DEBUG, "Save this:\n\033[34m%s\033[0m\n", ChrPtr(themsg)); quickie_message("Citadel", NULL, NULL, USERCONFIGROOM, ChrPtr(themsg), 4, "XMPP Mortuary"); FreeStrBuf(&themsg); } @@ -316,7 +312,6 @@ void xmpp_massacre_roster(void) xmpp_destroy_buddy(cptr[i].cs_inet_email); if (mortuary) { char *buddy = strdup(cptr[i].cs_inet_email); - CtdlLogPrintf(CTDL_DEBUG, "Put \033[33m%s\033[0m\n", buddy); Put(mortuary, buddy, strlen(buddy), buddy, generic_free_handler); } -- 2.30.2