* Reenabled the XMPP mortuary. If there's still a bug in this I need to find it.
authorArt Cancro <ajc@citadel.org>
Wed, 28 Apr 2010 17:03:55 +0000 (17:03 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 28 Apr 2010 17:03:55 +0000 (17:03 +0000)
citadel/modules/xmpp/serv_xmpp.c
citadel/modules/xmpp/xmpp_presence.c

index 977b6dea4c68a8b8453dde178f2a5176c41c0d46..093e80b57174074829ea19061a1dc34ba14202ed 100644 (file)
@@ -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("</stream>\n");
                CC->kill_me = 1;
        }
index fd1a737ed550203273a1d41b7c730941d2c530c2..c2c1af5cfdd9115abb3cff8f71f760bf3c670295 100644 (file)
@@ -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);
                                        }