pidgin: 52e2a425: Fix ludicrously long idle times for Same...

rekkanoryo at pidgin.im rekkanoryo at pidgin.im
Sun Dec 14 23:31:07 EST 2008


-----------------------------------------------------------------
Revision: 52e2a425de43a95def135fff5a6dbe87ed39acb5
Ancestor: 895d2560a5074216c9dc0a7a0ac718790710b8d1
Author: lpm+pidgin.im at pobox.com
Date: 2008-12-15T04:20:28
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/52e2a425de43a95def135fff5a6dbe87ed39acb5

Modified files:
        COPYRIGHT ChangeLog libpurple/protocols/sametime/sametime.c

ChangeLog: 

Fix ludicrously long idle times for Sametime 7.5 buddies by assuming idle time
is 0 if the idle timestamp from the buddy is in the future.  Fixes #3437.

-------------- next part --------------
============================================================
--- COPYRIGHT	f89ea1bde1004441e9b8513a190a894cfb0f97be
+++ COPYRIGHT	51936b412e856f920a620dc763e100b4757088c7
@@ -272,6 +272,7 @@ Michael Monreal
 David Mohr
 Andrew Molloy
 Michael Monreal
+Laurent Montaron
 Marco Monteiro
 Benjamin Moody
 John Moody
============================================================
--- ChangeLog	040c3b363208fb520572a60331105084a2163d9b
+++ ChangeLog	bd6d5ca9195c05f8c52f0aa32c950717169e39c4
@@ -22,6 +22,8 @@ version 2.5.3 (12/??/2008):
 	* Many QQ fixes and improvements, including the ability to connect
 	  using QQ2008 protocol and sending/receiving of long messages.
 	* Fix a crash with DNS SRV lookups (Florian Qu?ze)
+	* Fix insanely long idle times for Sametime 7.5 buddies by assuming 0 idle
+	  time if the idle timestamp is in the future (Laurent Montaron)
 
 	Gadu-Gadu:
 	* Fix some problems with Gadu-Gadu buddy icons (Adam Strzelecki)
============================================================
--- libpurple/protocols/sametime/sametime.c	ad03e93ca6d632a74f7d4edf6b61c20ebae1f884
+++ libpurple/protocols/sametime/sametime.c	0fb86a786a6b29c9e90f5abc6fb87f62188aa907
@@ -514,6 +514,11 @@ static void mw_aware_list_on_aware(struc
     idle_len = time(NULL) - idle;
     ugly_idle_len = ((time(NULL) * 1000) - idle) / 1000;
 
+	if(idle > ugly_idle_len)
+		ugly_idle_len = 0;
+	else
+		ugly_idle_len = (ugly_idle_len - idle) / 1000;
+
     /* 
        what's the deal here? Well, good clients are smart enough to
        publish their idle time by using an attribute to indicate that


More information about the Commits mailing list