libpurple/protocols/sametime/sametime.c

branch
vv
changeset 26178
2081d31d5466
parent 26171
85b43bce42f1
parent 25181
a104228b1fce
child 26186
18143bdefcd4
--- a/libpurple/protocols/sametime/sametime.c	Sun Dec 14 23:43:52 2008 +0000
+++ b/libpurple/protocols/sametime/sametime.c	Mon Dec 15 08:39:08 2008 +0000
@@ -158,7 +158,7 @@
   blist_choice_LOCAL = 1, /**< local only */
   blist_choice_MERGE = 2, /**< merge from server */
   blist_choice_STORE = 3, /**< merge from and save to server */
-  blist_choice_SYNCH = 4, /**< sync with server */
+  blist_choice_SYNCH = 4  /**< sync with server */
 };
 
 
@@ -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

mercurial