Example #1
0
static void
evcb_timeout(int fd, short ev_events, void *arg)
{
  AvahiTimeout *t;

  t = (AvahiTimeout *)arg;

  t->cb(t, t->userdata);
}
Example #2
0
/* timer cb (cancel + release) */
static
void gcdpollcb_timer(void *arg)
{
  AvahiTimeout *t;

  t = (AvahiTimeout *)arg;

  if (t->timer)
    {
      dispatch_source_cancel(t->timer);
      dispatch_release(t->timer);
      t->timer = NULL;
    }

  t->cb(t, t->userdata);
}