diff options
Diffstat (limited to 'common')
| -rw-r--r-- | common/utils.c | 5 | ||||
| -rw-r--r-- | common/utils.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/common/utils.c b/common/utils.c index 6803941..f66d889 100644 --- a/common/utils.c +++ b/common/utils.c | |||
| @@ -65,6 +65,11 @@ void fdlist_free(struct fdlist *list) | |||
| 65 | list->fds = NULL; | 65 | list->fds = NULL; |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | void fdlist_reset(struct fdlist *list) | ||
| 69 | { | ||
| 70 | list->count = 0; | ||
| 71 | } | ||
| 72 | |||
| 68 | void collection_init(struct collection *col) | 73 | void collection_init(struct collection *col) |
| 69 | { | 74 | { |
| 70 | col->list = malloc(sizeof(void *)); | 75 | col->list = malloc(sizeof(void *)); |
diff --git a/common/utils.h b/common/utils.h index ad4ac9d..f9cfa93 100644 --- a/common/utils.h +++ b/common/utils.h | |||
| @@ -39,6 +39,7 @@ struct fdlist { | |||
| 39 | void fdlist_create(struct fdlist *list); | 39 | void fdlist_create(struct fdlist *list); |
| 40 | void fdlist_add(struct fdlist *list, enum fdowner owner, int fd, short events); | 40 | void fdlist_add(struct fdlist *list, enum fdowner owner, int fd, short events); |
| 41 | void fdlist_free(struct fdlist *list); | 41 | void fdlist_free(struct fdlist *list); |
| 42 | void fdlist_reset(struct fdlist *list); | ||
| 42 | 43 | ||
| 43 | struct collection { | 44 | struct collection { |
| 44 | void **list; | 45 | void **list; |
