comparison libpurple/protocols/sametime/sametime.c @ 26054:68f4edb42f39

propagate from branch 'im.pidgin.pidgin' (head e36b0b63962b9c710ecd798a529e1d2b78d7879a) to branch 'im.pidgin.pidgin.vv' (head bb0c02f78281c46db41ef3efba2896a2edad4441)
author Mike Ruprecht <maiku@soc.pidgin.im>
date Mon, 15 Dec 2008 08:39:08 +0000
parents 25e2ab1fff1d 508e57943440
children f0c2e27c7ae7
comparison
equal deleted inserted replaced
26053:99c3489e06b0 26054:68f4edb42f39
156 /** the possible buddy list storage settings */ 156 /** the possible buddy list storage settings */
157 enum blist_choice { 157 enum blist_choice {
158 blist_choice_LOCAL = 1, /**< local only */ 158 blist_choice_LOCAL = 1, /**< local only */
159 blist_choice_MERGE = 2, /**< merge from server */ 159 blist_choice_MERGE = 2, /**< merge from server */
160 blist_choice_STORE = 3, /**< merge from and save to server */ 160 blist_choice_STORE = 3, /**< merge from and save to server */
161 blist_choice_SYNCH = 4, /**< sync with server */ 161 blist_choice_SYNCH = 4 /**< sync with server */
162 }; 162 };
163 163
164 164
165 /** the default blist storage option */ 165 /** the default blist storage option */
166 #define BLIST_CHOICE_DEFAULT blist_choice_SYNCH 166 #define BLIST_CHOICE_DEFAULT blist_choice_SYNCH
511 511
512 DEBUG_INFO("%s has idle value 0x%x\n", NSTR(id), idle); 512 DEBUG_INFO("%s has idle value 0x%x\n", NSTR(id), idle);
513 513
514 idle_len = time(NULL) - idle; 514 idle_len = time(NULL) - idle;
515 ugly_idle_len = ((time(NULL) * 1000) - idle) / 1000; 515 ugly_idle_len = ((time(NULL) * 1000) - idle) / 1000;
516
517 if(idle > ugly_idle_len)
518 ugly_idle_len = 0;
519 else
520 ugly_idle_len = (ugly_idle_len - idle) / 1000;
516 521
517 /* 522 /*
518 what's the deal here? Well, good clients are smart enough to 523 what's the deal here? Well, good clients are smart enough to
519 publish their idle time by using an attribute to indicate that 524 publish their idle time by using an attribute to indicate that
520 they went idle at some time UTC, in seconds since epoch. Bad 525 they went idle at some time UTC, in seconds since epoch. Bad