diff --git a/oop.h b/oop.h index b25a08c78e8b76abd48ee94f4d1a1ad53aadcf14..c94096328fda513918fe5d498c81c34c1334ce33 100644 --- a/oop.h +++ b/oop.h @@ -69,8 +69,10 @@ typedef struct oop_source_sys oop_source_sys; oop_source_sys *oop_sys_new(void); /* Process events until either of the following two conditions: - 1 -- some callback returns non-NULL; will return the value in question. - 2 -- no callbacks are registered; will return NULL. */ + 1 -- some callback returns anything but OOP_CONTINUE; + will return the value in question. + 2 -- no callbacks are registered; will return OOP_CONTINUE. + 3 -- an error occurs; will return OOP_ERROR (check errno). */ void *oop_sys_run(oop_source_sys *); /* Delete a system event source. No callbacks may be registered. */ diff --git a/sys.c b/sys.c index 8657569994c53927cb901b6336e2f8ae2a5d299c..f33a63141eb29cd1345f86639fccb219313dcbb5 100644 --- a/sys.c +++ b/sys.c @@ -101,6 +101,7 @@ static void sys_cancel_fd(oop_source *source,int fd,oop_event ev) { oop_source_sys *sys = verify_source(source); if (fd < sys->num_files && NULL != sys->files[fd][ev].f) { sys->files[fd][ev].f = NULL; + sys->files[fd][ev].v = NULL; --sys->num_events; } }