# HG changeset patch # User Mark Doliner # Date 1048194787 0 # Node ID 7bdda84b5431f08ea76452abbc735aa08fedbfe3 # Parent a701ef9258501e7467de66d9ff08ac571ccd42ea [gaim-migrate @ 5166] This fixes the bug where people would show up as being online for 47 thousand days in their mouse overs. To all the people that experienced this bug: Set the clocks on your computers correctly, foos. And now some quotes: Good versus evil equals confrontation Good turned to evil and a push comes to shove, we must save the world with an act of love "How could you not love it? This buddy list is endangering marriages." committer: Tailor Script diff -r a701ef925850 -r 7bdda84b5431 src/multi.h --- a/src/multi.h Thu Mar 20 16:58:09 2003 +0000 +++ b/src/multi.h Thu Mar 20 21:13:07 2003 +0000 @@ -56,9 +56,9 @@ /* stuff needed for per-connection idle times */ guint idle_timer; time_t login_time; + time_t login_time_official; time_t lastsent; int is_idle; - time_t correction_time; char *away; /* set by protos, is NULL when not away, or set * * to "" or a custom message when away */ diff -r a701ef925850 -r 7bdda84b5431 src/protocols/oscar/oscar.c --- a/src/protocols/oscar/oscar.c Thu Mar 20 16:58:09 2003 +0000 +++ b/src/protocols/oscar/oscar.c Thu Mar 20 21:13:07 2003 +0000 @@ -2998,7 +2998,7 @@ if (bi) { gchar *yay; char *caps = caps_string(bi->caps); - char *tstr = sec_to_text(time(NULL) - bi->signon); + char *tstr = sec_to_text(time(NULL) - bi->signon + gc->login_time_official - gc->login_time); yay = g_strdup_printf(_("Logged In: %s%s%s"), tstr, caps ? _("\nCapabilities: ") : "", caps ? caps : ""); free(tstr); @@ -3519,7 +3519,9 @@ va_end(ap); gc->evil = info->warnlevel/10; - /* gc->correction_time = (info->onlinesince - gc->login_time); */ + + if (info->onlinesince) + gc->login_time_official = info->onlinesince; return 1; } diff -r a701ef925850 -r 7bdda84b5431 src/server.c --- a/src/server.c Thu Mar 20 16:58:09 2003 +0000 +++ b/src/server.c Thu Mar 20 21:13:07 2003 +0000 @@ -857,7 +857,7 @@ char *tmp = g_strdup(normalize(name)); if (!gaim_utf8_strcasecmp(tmp, normalize(gc->username))) { gc->evil = evil; - gc->correction_time = (signon - gc->login_time); + gc->login_time_official = signon; /*update_idle_times();*/ } g_free(tmp);