# HG changeset patch # User Richard Laager # Date 1179554161 0 # Node ID 6545d21b6f5ba5ae1d7e203e24aa4587be85a066 # Parent 856a2504622846d10054944ee923d3701c57c169 Move the time_until_next_idle_event < 0 check to clarify. diff -r 856a25046228 -r 6545d21b6f5b libpurple/idle.c --- a/libpurple/idle.c Sat May 19 05:53:29 2007 +0000 +++ b/libpurple/idle.c Sat May 19 05:56:01 2007 +0000 @@ -157,7 +157,12 @@ time_idle = time(NULL) - last_active_time; } - time_until_next_idle_event = IDLEMARK - time_idle; /* reasonable start upperbound */ + time_until_next_idle_event = IDLEMARK - time_idle; + if (time_until_next_idle_event < 0) + { + /* If we're already idle, check again in a minute. */ + time_until_next_idle_event = 60; + } if (auto_away || !no_away) away_seconds = 60 * purple_prefs_get_int("/purple/away/mins_before_away"); @@ -189,9 +194,6 @@ while (idled_accts != NULL) set_account_unidle(idled_accts->data); } - - if (time_until_next_idle_event < 0) - time_until_next_idle_event = IDLEMARK; }