diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2014-08-02 00:09:23 +0200 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2014-08-02 21:32:26 +0200 |
commit | 2fe3c7ed455f9f233d1cd4180d8a33f7628a2c1d (patch) | |
tree | 602ecdfb88fd3fd5a938d38cfc253dfaf9ff574c /src/common.c | |
parent | 9720e30c8bca98cc20730cdb9650ac2f4dc02472 (diff) | |
download | xK-2fe3c7ed455f9f233d1cd4180d8a33f7628a2c1d.tar.gz xK-2fe3c7ed455f9f233d1cd4180d8a33f7628a2c1d.tar.xz xK-2fe3c7ed455f9f233d1cd4180d8a33f7628a2c1d.zip |
kike: implement the ping-pong and QUIT
Diffstat (limited to 'src/common.c')
-rw-r--r-- | src/common.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common.c b/src/common.c index fba82b4..2593cdc 100644 --- a/src/common.c +++ b/src/common.c @@ -961,6 +961,15 @@ poller_timers_find (struct poller_timers *self, return -1; } +static ssize_t +poller_timers_find_by_data (struct poller_timers *self, void *data) +{ + for (size_t i = 0; i < self->len; i++) + if (self->info[i].user_data == data) + return i; + return -1; +} + static void poller_timers_add (struct poller_timers *self, poller_timer_func dispatcher, void *data, int timeout_ms) |