From b5b0be927dd4400a2edb46efe7aba20331dff547 Mon Sep 17 00:00:00 2001 From: hackbard Date: Tue, 18 May 2004 12:34:09 +0000 Subject: [PATCH] copy timeout into seperate timeval struct for select call --- src/event.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/event.c b/src/event.c index 398e156..03e9656 100644 --- a/src/event.c +++ b/src/event.c @@ -43,6 +43,7 @@ int event_start(t_event *event,void *ptr, int (*callback1)(t_event *event,void *ptr)) { int s_ret; + struct timeval tv; /* switch on event system */ event->status=ENABLED; @@ -51,9 +52,10 @@ int event_start(t_event *event,void *ptr, event->rfds=event->rfds_o; event->wfds=event->wfds_o; + tv=event->timeout; if((s_ret=select(event->maxfd+1,&(event->rfds),&(event->wfds),NULL, - &(event->timeout)))==-1) { + &tv))==-1) { perror("[event] select call"); return E_ERROR; } -- 2.39.2