changeset 10151:d83e6f2125b1

[gaim-migrate @ 11228] Patch by Andrew Hart to fix some bugs in the priority calculations. Marv says it still doesn't work for him, so we probably have a bug elsewhere, but this patch is correct. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sat, 30 Oct 2004 02:28:50 +0000
parents 31ade5ef01cc
children 3cec08c6179c
files src/status.c src/status.h
diffstat 2 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/status.c	Fri Oct 29 14:49:43 2004 +0000
+++ b/src/status.c	Sat Oct 30 02:28:50 2004 +0000
@@ -1444,9 +1444,9 @@
 	if ((presence1 == NULL && presence2 == NULL) || (presence1 == presence2))
 		return 0;
 	else if (presence1 == NULL)
-		return -1;
+		return 1;
 	else if (presence2 == NULL)
-		return 1;
+		return -1;
 
 	/* Compute the score of the first set of statuses. */
 	for (l = gaim_presence_get_statuses(presence1); l != NULL; l = l->next)
@@ -1459,7 +1459,7 @@
 	}
 
 	/* Compute the score of the second set of statuses. */
-	for (l = gaim_presence_get_statuses(presence1); l != NULL; l = l->next)
+	for (l = gaim_presence_get_statuses(presence2); l != NULL; l = l->next)
 	{
 		GaimStatus *status = (GaimStatus *)l->data;
 		GaimStatusType *type = gaim_status_get_type(status);
--- a/src/status.h	Fri Oct 29 14:49:43 2004 +0000
+++ b/src/status.h	Sat Oct 30 02:28:50 2004 +0000
@@ -49,8 +49,8 @@
  */
 typedef enum
 {
-	GAIM_STATUS_UNSET     = -1,
-	GAIM_STATUS_OFFLINE   = 0,
+	GAIM_STATUS_UNSET = 0,
+	GAIM_STATUS_OFFLINE,
 	GAIM_STATUS_ONLINE,
 	GAIM_STATUS_AVAILABLE,
 	GAIM_STATUS_UNAVAILABLE,