From 2fe3c7ed455f9f233d1cd4180d8a33f7628a2c1d Mon Sep 17 00:00:00 2001
From: Přemysl Janouch
Date: Sat, 2 Aug 2014 00:09:23 +0200
Subject: kike: implement the ping-pong and QUIT
---
src/common.c | 9 +++++++++
1 file changed, 9 insertions(+)
(limited to 'src/common.c')
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)
--
cgit v1.2.3-70-g09d2