static void
_ecore_avahi_watch_update(AvahiWatch *w, AvahiWatchEvent events)
{
- Ecore_Avahi_Watch *watch = (Ecore_Avahi_Watch *) w;
+ Ecore_Avahi_Watch *watch = (Ecore_Avahi_Watch *) w;
ecore_main_fd_handler_active_set(watch->handler, _ecore_avahi_events2ecore(events));
}
{
Ecore_Avahi_Timeout *timeout = data;
- ecore_timer_freeze(timeout->timer);
timeout->callback((AvahiTimeout*) timeout, timeout->callback_data);
- return ECORE_CALLBACK_RENEW;
+ timeout->timer = NULL;
+ return ECORE_CALLBACK_CANCEL;
}
static AvahiTimeout *
ea = api->userdata;
timeout = calloc(1, sizeof (Ecore_Avahi_Timeout));
if (!timeout) return NULL;
- timeout->timer = ecore_timer_add(_ecore_avahi_timeval2double(tv),
- _ecore_avahi_timeout_cb, timeout);
- if (!tv) ecore_timer_freeze(timeout->timer);
+ if (tv) timeout->timer = ecore_timer_add(_ecore_avahi_timeval2double(tv),
+ _ecore_avahi_timeout_cb, timeout);
timeout->callback = callback;
timeout->callback_data = userdata;
timeout->parent = ea;
{
Ecore_Avahi_Timeout *timeout = (Ecore_Avahi_Timeout *) t;
+ if (timeout->timer) ecore_timer_del(timeout->timer);
+ timeout->timer = NULL;
+
if (tv)
- {
- ecore_timer_interval_set(timeout->timer, _ecore_avahi_timeval2double(tv));
- if (ecore_timer_freeze_get(timeout->timer))
- ecore_timer_thaw(timeout->timer);
- }
- else
- {
- ecore_timer_freeze(timeout->timer);
- }
+ timeout->timer = ecore_timer_add(_ecore_avahi_timeval2double(tv),
+ _ecore_avahi_timeout_cb, timeout);
}
static void
{
Ecore_Avahi_Timeout *timeout = (Ecore_Avahi_Timeout *) t;
- ecore_timer_del(timeout->timer);
+ if (timeout->timer) ecore_timer_del(timeout->timer);
timeout->parent->timeouts = eina_list_remove(timeout->parent->timeouts, timeout);
free(timeout);
}