[ekg2-commit] ekg2: misc.c (HEAD) [peres]

CVS commit cvs w toxygen.net
Czw, 3 Maj 2007, 22:30:06 CEST


Module name:	ekg2
Changes by:	peres	2007-05-03 22:30:04

Modified files:
	misc.c

Log message:
Comments update, code prettification.

Index: misc.c
===================================================================
RCS file: /home/cvs/ekg2/plugins/jabber/misc.c,v
diff -d -u -r1.55 -r1.56
--- misc.c	3 May 2007 20:22:42 -0000	1.55
+++ misc.c	3 May 2007 20:30:04 -0000	1.56
@@ -569,19 +569,16 @@
 /**
  * jabber_thread_gen() generates new thread-ID for outgoing messages.
  *
- * @bug		Currently used method does generate TID-s, that are only unique-per-session. Something more random needed?
- *
  * @param	j	- private data of session.
  * @param	uid	- recipient UID.
  *
  * @return	New, session-unique thread-ID.
  */
 char *jabber_thread_gen(jabber_private_t *j, const char *uid) {
-	int i, k, n = 0;
-	char *thread = NULL;
+	int i, k, n	= 0;
+	char *thread	= NULL;
 
-		/* don't ask me now, why it is like that...
-		 * why I haven't used comments?! */
+		/* just trying to find first free one */
 	for (i = jabber_conversation_find(j, NULL, NULL, NULL, NULL, 0), k = i; n != k; i++) {
 		xfree(thread);
 		thread = saprintf("thr%d-%8x-%8x", i, rand(), time(NULL)); /* that should look gorgeous */


Więcej informacji o liście dyskusyjnej ekg2-commit