[Galago-commits] r2873 - in trunk/libgalago: . libgalago

galago-commits at freedesktop.org galago-commits at freedesktop.org
Tue Jul 11 19:29:54 PDT 2006


Author: chipx86
Date: 2006-07-11 19:29:48 -0700 (Tue, 11 Jul 2006)
New Revision: 2873

Modified:
   trunk/libgalago/ChangeLog
   trunk/libgalago/NEWS
   trunk/libgalago/libgalago/galago-presence.c
Log:
Fixed some invalid return values from galago_presence_compare() when one of the parameters was NULL or when one account was idle and the other was not.


Modified: trunk/libgalago/ChangeLog
===================================================================
--- trunk/libgalago/ChangeLog	2006-07-03 09:07:19 UTC (rev 2872)
+++ trunk/libgalago/ChangeLog	2006-07-12 02:29:48 UTC (rev 2873)
@@ -1,3 +1,11 @@
+Tue Jul 11 19:29:01 PDT 2006  Christian Hammond <chipx86 at chipx86.com>
+
+	* libgalago/galago-presence.c:
+	* NEWS:
+	  - Fixed some invalid return values from galago_presence_compare() when
+	    one of the parameters was NULL or when one account was idle and
+	    the other was not.
+
 Mon Jun 12 19:59:22 PDT 2006  Christian Hammond <chipx86 at chipx86.com>
 
 	* NEWS:

Modified: trunk/libgalago/NEWS
===================================================================
--- trunk/libgalago/NEWS	2006-07-03 09:07:19 UTC (rev 2872)
+++ trunk/libgalago/NEWS	2006-07-12 02:29:48 UTC (rev 2873)
@@ -1,6 +1,9 @@
 version 0.5.2:
 	* Fixed a crash when passing an idle start time of 0 to
 	  galago_presence_set_idle(). (Bug #64)
+	* Fixed some invalid return values from galago_presence_compare() when
+	  one of the parameters was NULL or when one account was idle and the
+	  other was not.
 	* Added the following asynchronous query functions:
 	  - galago_account_get_avatar_async
 	  - galago_account_get_presence_async

Modified: trunk/libgalago/libgalago/galago-presence.c
===================================================================
--- trunk/libgalago/libgalago/galago-presence.c	2006-07-03 09:07:19 UTC (rev 2872)
+++ trunk/libgalago/libgalago/galago-presence.c	2006-07-12 02:29:48 UTC (rev 2873)
@@ -928,9 +928,9 @@
 	if (presence1 == presence2)
 		return 0;
 	else if (presence1 == NULL)
+		return -1;
+	else if (presence2 == NULL)
 		return 1;
-	else if (presence2 == NULL)
-		return -1;
 
 	/* Compute the score of the first set of statuses. */
 	for (l = galago_presence_get_statuses(presence1); l != NULL; l = l->next)
@@ -958,9 +958,9 @@
 		if (!idle1 && !idle2)
 			return 0;
 		else if (idle1 && !idle2)
+			return -1;
+		else if (!idle1 && idle2)
 			return 1;
-		else if (!idle1 && idle2)
-			return -1;
 		else
 		{
 			time_t idle_time_1;



More information about the galago-commits mailing list