diff options
| -rw-r--r-- | events.c | 4 | ||||
| -rw-r--r-- | events.h | 2 | 
2 files changed, 3 insertions, 3 deletions
@@ -66,14 +66,14 @@ void events_watch_fd(struct events *events, int fd, enum event_type type,  	list_append(&event->list, &events->events);  } -void events_unwatch_fd(struct events *events, int fd) +void events_unwatch_fd(struct events *events, int fd, enum event_type type)  {  	struct event_fd *event = NULL;  	struct event_fd *entry;  	int maxfd = 0;  	list_for_each_entry(entry, &events->events, list) { -		if (entry->fd == fd) +		if (entry->fd == fd && entry->type == type)  			event = entry;  		else  			maxfd = max(maxfd, entry->fd); @@ -38,7 +38,7 @@ enum event_type {  void events_watch_fd(struct events *events, int fd, enum event_type type,  		     void(*callback)(void *), void *priv); -void events_unwatch_fd(struct events *events, int fd); +void events_unwatch_fd(struct events *events, int fd, enum event_type type);  bool events_loop(struct events *events);  void events_stop(struct events *events);  | 
