Mercurial > pidgin.yaz
diff libpurple/protocols/sametime/sametime.c @ 24699:508e57943440
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.
committer: John Bailey <rekkanoryo@rekkanoryo.org>
author | Laurent Montaron <lpm+pidgin.im@pobox.com> |
---|---|
date | Mon, 15 Dec 2008 04:20:28 +0000 |
parents | d8452c0bec7b |
children | 4455637864b4 f8dbd57cf635 68f4edb42f39 |
line wrap: on
line diff
--- a/libpurple/protocols/sametime/sametime.c Mon Dec 15 04:02:28 2008 +0000 +++ b/libpurple/protocols/sametime/sametime.c Mon Dec 15 04:20:28 2008 +0000 @@ -514,6 +514,11 @@ 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