1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-03-09 23:38:56 +00:00

build: adjust to new libsystemd-event API

The individual timer-sources were replaced by a unified timer-source.
Adjust to that.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
This commit is contained in:
David Herrmann 2014-05-09 09:29:39 +02:00
parent 37c2169c9e
commit 0f9ca6e7b8
4 changed files with 39 additions and 30 deletions

View file

@ -252,8 +252,9 @@ static void schedule_timeout(sd_event_source **out,
if (r < 0)
cli_vERR(r);
} else {
r = sd_event_add_monotonic(cli_event,
r = sd_event_add_time(cli_event,
out,
CLOCK_MONOTONIC,
rel_usec,
0,
timeout_fn,

View file

@ -2671,8 +2671,9 @@ static int rtsp_link_waiting(struct rtsp_message *m)
/* no need to wait for timeout if no-body listens */
if (m->bus->event && m->cb_fn) {
r = sd_event_add_monotonic(m->bus->event,
r = sd_event_add_time(m->bus->event,
&m->timer_source,
CLOCK_MONOTONIC,
m->timeout,
0,
rtsp_timer_fn,
@ -3046,8 +3047,9 @@ int rtsp_attach_event(struct rtsp *bus, sd_event *event, int priority)
if (!m->cb_fn)
continue;
r = sd_event_add_monotonic(bus->event,
r = sd_event_add_time(bus->event,
&m->timer_source,
CLOCK_MONOTONIC,
m->timeout,
0,
rtsp_timer_fn,

View file

@ -1565,8 +1565,9 @@ int wpas_attach_event(struct wpas *w, sd_event *event, int priority)
if (r < 0)
goto error;
r = sd_event_add_monotonic(w->event,
r = sd_event_add_time(w->event,
&w->timer_source,
CLOCK_MONOTONIC,
0,
0,
wpas_timer_fn,
@ -1574,6 +1575,10 @@ int wpas_attach_event(struct wpas *w, sd_event *event, int priority)
if (r < 0)
goto error;
r = sd_event_source_set_enabled(w->timer_source, SD_EVENT_OFF);
if (r < 0)
goto error;
r = sd_event_source_set_priority(w->timer_source, priority);
if (r < 0)
goto error;

View file

@ -2478,8 +2478,9 @@ int supplicant_start(struct supplicant *s)
goto error;
/* add initial 200ms startup timer */
r = sd_event_add_monotonic(s->l->m->event,
r = sd_event_add_time(s->l->m->event,
&s->timer_source,
CLOCK_MONOTONIC,
shl_now(CLOCK_MONOTONIC) + 200 * 1000ULL,
0,
supplicant_timer_fn,