projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4a96791
)
* more work on the dead buddies purge
author
Art Cancro
<ajc@citadel.org>
Mon, 22 Mar 2010 04:57:27 +0000
(
04:57
+0000)
committer
Art Cancro
<ajc@citadel.org>
Mon, 22 Mar 2010 04:57:27 +0000
(
04:57
+0000)
citadel/modules/xmpp/xmpp_presence.c
patch
|
blob
|
history
diff --git
a/citadel/modules/xmpp/xmpp_presence.c
b/citadel/modules/xmpp/xmpp_presence.c
index 1a4cda0482c3f5e0fd8f534b25bd73063b144083..3df2217c3b78e996da2240ff27ebd87dae88b24c 100644
(file)
--- a/
citadel/modules/xmpp/xmpp_presence.c
+++ b/
citadel/modules/xmpp/xmpp_presence.c
@@
-211,6
+211,8
@@
HashList *xmpp_fetch_mortuary(void) {
return(NULL);
}
return(NULL);
}
+ /* FIXME finish this */
+
return(mortuary);
}
return(mortuary);
}
@@
-225,14
+227,29
@@
void xmpp_store_mortuary(HashList *mortuary) {
long len;
void *Value;
const char *Key;
long len;
void *Value;
const char *Key;
+ StrBuf *themsg;
+
+ themsg = NewStrBuf();
+ StrBufPrintf(themsg, "Content-type: " XMPPMORTUARY "\n"
+ "Content-transfer-encoding: 7bit\n"
+ "\n"
+ );
HashPos = GetNewHashPos(mortuary, 0);
while (GetNextHashPos(mortuary, HashPos, &len, &Key, &Value) != 0)
{
HashPos = GetNewHashPos(mortuary, 0);
while (GetNextHashPos(mortuary, HashPos, &len, &Key, &Value) != 0)
{
-
CtdlLogPrintf(CTDL_DEBUG, "FIXME WRITE \033[31m%s\033[0m
\n", (char *)Value);
+
StrBufAppendPrintf(themsg, "%s
\n", (char *)Value);
/* note: don't free(Value) -- deleting the hash list will handle this for us */
}
DeleteHashPos(&HashPos);
/* note: don't free(Value) -- deleting the hash list will handle this for us */
}
DeleteHashPos(&HashPos);
+
+ /* Save it to disk */
+ quickie_message("Citadel", NULL, NULL, USERCONFIGROOM, ChrPtr(themsg), 4, "XMPP Mortuary");
+
+ /* Delete the old one */
+ CtdlDeleteMessages(USERCONFIGROOM, NULL, 0, XMPPMORTUARY);
+
+ FreeStrBuf(&themsg);
}
}