Sync OpenBSD patchset 504:

Use timeout events for the identify and message timers.
This commit is contained in:
Tiago Cunha
2009-11-08 23:11:23 +00:00
parent bee17719d8
commit 02438c01b7
4 changed files with 36 additions and 20 deletions

View File

@ -1,4 +1,4 @@
/* $Id: server-client.c,v 1.15 2009-11-08 23:09:36 tcunha Exp $ */
/* $Id: server-client.c,v 1.16 2009-11-08 23:11:23 tcunha Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@ -119,8 +119,11 @@ server_client_lost(struct client *c)
if (c->title != NULL)
xfree(c->title);
evtimer_del(&c->identify_timer);
if (c->message_string != NULL)
xfree(c->message_string);
evtimer_del(&c->message_timer);
if (c->prompt_string != NULL)
xfree(c->prompt_string);
@ -447,12 +450,6 @@ server_client_check_timers(struct client *c)
if (gettimeofday(&tv, NULL) != 0)
fatal("gettimeofday failed");
if (c->flags & CLIENT_IDENTIFY && timercmp(&tv, &c->identify_timer, >))
server_clear_identify(c);
if (c->message_string != NULL && timercmp(&tv, &c->message_timer, >))
status_message_clear(c);
if (c->message_string != NULL || c->prompt_string != NULL) {
/*
* Don't need timed redraw for messages/prompts so bail now.