mirror of
https://github.com/albfan/miraclecast.git
synced 2025-02-12 19:11:58 +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:
parent
37c2169c9e
commit
0f9ca6e7b8
4 changed files with 39 additions and 30 deletions
|
@ -252,12 +252,13 @@ static void schedule_timeout(sd_event_source **out,
|
|||
if (r < 0)
|
||||
cli_vERR(r);
|
||||
} else {
|
||||
r = sd_event_add_monotonic(cli_event,
|
||||
out,
|
||||
rel_usec,
|
||||
0,
|
||||
timeout_fn,
|
||||
data);
|
||||
r = sd_event_add_time(cli_event,
|
||||
out,
|
||||
CLOCK_MONOTONIC,
|
||||
rel_usec,
|
||||
0,
|
||||
timeout_fn,
|
||||
data);
|
||||
if (r < 0)
|
||||
cli_vERR(r);
|
||||
}
|
||||
|
|
|
@ -2671,12 +2671,13 @@ 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,
|
||||
&m->timer_source,
|
||||
m->timeout,
|
||||
0,
|
||||
rtsp_timer_fn,
|
||||
m);
|
||||
r = sd_event_add_time(m->bus->event,
|
||||
&m->timer_source,
|
||||
CLOCK_MONOTONIC,
|
||||
m->timeout,
|
||||
0,
|
||||
rtsp_timer_fn,
|
||||
m);
|
||||
if (r < 0)
|
||||
goto error;
|
||||
|
||||
|
@ -3046,12 +3047,13 @@ int rtsp_attach_event(struct rtsp *bus, sd_event *event, int priority)
|
|||
if (!m->cb_fn)
|
||||
continue;
|
||||
|
||||
r = sd_event_add_monotonic(bus->event,
|
||||
&m->timer_source,
|
||||
m->timeout,
|
||||
0,
|
||||
rtsp_timer_fn,
|
||||
m);
|
||||
r = sd_event_add_time(bus->event,
|
||||
&m->timer_source,
|
||||
CLOCK_MONOTONIC,
|
||||
m->timeout,
|
||||
0,
|
||||
rtsp_timer_fn,
|
||||
m);
|
||||
if (r < 0)
|
||||
goto error;
|
||||
|
||||
|
|
|
@ -1565,12 +1565,17 @@ int wpas_attach_event(struct wpas *w, sd_event *event, int priority)
|
|||
if (r < 0)
|
||||
goto error;
|
||||
|
||||
r = sd_event_add_monotonic(w->event,
|
||||
&w->timer_source,
|
||||
0,
|
||||
0,
|
||||
wpas_timer_fn,
|
||||
w);
|
||||
r = sd_event_add_time(w->event,
|
||||
&w->timer_source,
|
||||
CLOCK_MONOTONIC,
|
||||
0,
|
||||
0,
|
||||
wpas_timer_fn,
|
||||
w);
|
||||
if (r < 0)
|
||||
goto error;
|
||||
|
||||
r = sd_event_source_set_enabled(w->timer_source, SD_EVENT_OFF);
|
||||
if (r < 0)
|
||||
goto error;
|
||||
|
||||
|
|
|
@ -2478,12 +2478,13 @@ int supplicant_start(struct supplicant *s)
|
|||
goto error;
|
||||
|
||||
/* add initial 200ms startup timer */
|
||||
r = sd_event_add_monotonic(s->l->m->event,
|
||||
&s->timer_source,
|
||||
shl_now(CLOCK_MONOTONIC) + 200 * 1000ULL,
|
||||
0,
|
||||
supplicant_timer_fn,
|
||||
s);
|
||||
r = sd_event_add_time(s->l->m->event,
|
||||
&s->timer_source,
|
||||
CLOCK_MONOTONIC,
|
||||
shl_now(CLOCK_MONOTONIC) + 200 * 1000ULL,
|
||||
0,
|
||||
supplicant_timer_fn,
|
||||
s);
|
||||
if (r < 0) {
|
||||
log_vERR(r);
|
||||
goto error;
|
||||
|
|
Loading…
Reference in a new issue