Move the timeout handling to the connection object.

This commit is contained in:
Jan Vidar Krey
2009-08-03 21:57:18 +02:00
parent 4a5993ccc2
commit fbe98d6011
9 changed files with 89 additions and 60 deletions

View File

@@ -67,9 +67,9 @@ void on_login_success(struct hub_info* hub, struct hub_user* u)
/* Send message of the day (if any) */
if (user_is_logged_in(u)) /* Previous send() can fail! */
hub_send_motd(hub, u);
/* reset to idle timeout */
user_set_timeout(u, TIMEOUT_IDLE);
/* reset timeout */
net_con_clear_timeout(&u->net.connection);
}
void on_login_failure(struct hub_info* hub, struct hub_user* u, enum status_message msg)