[ekg2-commit] ekg2: commands.c (HEAD) misc.c (HEAD) [peres]
CVS commit
cvs w toxygen.net
Czw, 3 Maj 2007, 22:22:44 CEST
Module name: ekg2
Changes by: peres 2007-05-03 22:22:42
Modified files:
commands.c misc.c
Log message:
jabber_thread_gen()'s new power.
Index: commands.c
===================================================================
RCS file: /home/cvs/ekg2/plugins/jabber/commands.c,v
diff -d -u -r1.165 -r1.166
--- commands.c 3 May 2007 20:07:56 -0000 1.165
+++ commands.c 3 May 2007 20:22:41 -0000 1.166
@@ -523,11 +523,8 @@
/* and now we can set real thread */
thread = jabber_escape(params[2]);
- } else if (!xstrcasecmp(name, "msg") && (session_int_get(session, "msg_gen_thread") > 0)) {
- char *tmp = jabber_thread_gen(j, uid);
- thread = jabber_unescape(tmp);
- xfree(tmp);
- }
+ } else if (!xstrcasecmp(name, "msg") && (session_int_get(session, "msg_gen_thread") > 0))
+ thread = jabber_thread_gen(j, uid); /* we don't return any chars to escape */
/* message subject, TheNewBetterWay^TM */
if (!j->istlen && config_subject_prefix && !xstrncmp(params[1], config_subject_prefix, subjectlen)) {
Index: misc.c
===================================================================
RCS file: /home/cvs/ekg2/plugins/jabber/misc.c,v
diff -d -u -r1.54 -r1.55
--- misc.c 3 May 2007 19:41:21 -0000 1.54
+++ misc.c 3 May 2007 20:22:42 -0000 1.55
@@ -584,7 +584,7 @@
* why I haven't used comments?! */
for (i = jabber_conversation_find(j, NULL, NULL, NULL, NULL, 0), k = i; n != k; i++) {
xfree(thread);
- thread = saprintf("thr%d", i);
+ thread = saprintf("thr%d-%8x-%8x", i, rand(), time(NULL)); /* that should look gorgeous */
n = jabber_conversation_find(j, thread, NULL, uid, NULL, 0);
debug("[jabber,thread_gen] i = %d, k = %d, n = %d, t = %s\n", i, n, k, thread);
}
Więcej informacji o liście dyskusyjnej ekg2-commit