src/server/daemon/event.c

changeset 543
3335f431a91b
parent 542
1327febf99c4
child 547
280bf87c8689
equal deleted inserted replaced
542:1327febf99c4 543:3335f431a91b
159 void watchlist_check(EventHandler *h, time_t t) { 159 void watchlist_check(EventHandler *h, time_t t) {
160 if(t == 0) { 160 if(t == 0) {
161 t = time(NULL); 161 t = time(NULL);
162 } 162 }
163 163
164 log_ereport(LOG_DEBUG, "eventhandler: check watchlist");
165
166 EVWatchList *elm = h->watchlist_begin;
167 while(elm) {
168 EVWatchList *next = elm->next;
169
170 if(elm->expire < t) {
171 ev_watchlist_remove(h, elm);
172
173 if(elm->destroy) {
174 elm->destroy(h, elm);
175 }
176 }
177
178 elm = next;
179 }
180
164 181
165 } 182 }

mercurial