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:
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)
|
if (r < 0)
|
||||||
cli_vERR(r);
|
cli_vERR(r);
|
||||||
} else {
|
} else {
|
||||||
r = sd_event_add_monotonic(cli_event,
|
r = sd_event_add_time(cli_event,
|
||||||
out,
|
out,
|
||||||
rel_usec,
|
CLOCK_MONOTONIC,
|
||||||
0,
|
rel_usec,
|
||||||
timeout_fn,
|
0,
|
||||||
data);
|
timeout_fn,
|
||||||
|
data);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
cli_vERR(r);
|
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 */
|
/* no need to wait for timeout if no-body listens */
|
||||||
if (m->bus->event && m->cb_fn) {
|
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,
|
&m->timer_source,
|
||||||
m->timeout,
|
CLOCK_MONOTONIC,
|
||||||
0,
|
m->timeout,
|
||||||
rtsp_timer_fn,
|
0,
|
||||||
m);
|
rtsp_timer_fn,
|
||||||
|
m);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
@ -3046,12 +3047,13 @@ int rtsp_attach_event(struct rtsp *bus, sd_event *event, int priority)
|
||||||
if (!m->cb_fn)
|
if (!m->cb_fn)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
r = sd_event_add_monotonic(bus->event,
|
r = sd_event_add_time(bus->event,
|
||||||
&m->timer_source,
|
&m->timer_source,
|
||||||
m->timeout,
|
CLOCK_MONOTONIC,
|
||||||
0,
|
m->timeout,
|
||||||
rtsp_timer_fn,
|
0,
|
||||||
m);
|
rtsp_timer_fn,
|
||||||
|
m);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
|
|
@ -1565,12 +1565,17 @@ int wpas_attach_event(struct wpas *w, sd_event *event, int priority)
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
r = sd_event_add_monotonic(w->event,
|
r = sd_event_add_time(w->event,
|
||||||
&w->timer_source,
|
&w->timer_source,
|
||||||
0,
|
CLOCK_MONOTONIC,
|
||||||
0,
|
0,
|
||||||
wpas_timer_fn,
|
0,
|
||||||
w);
|
wpas_timer_fn,
|
||||||
|
w);
|
||||||
|
if (r < 0)
|
||||||
|
goto error;
|
||||||
|
|
||||||
|
r = sd_event_source_set_enabled(w->timer_source, SD_EVENT_OFF);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
|
|
@ -2478,12 +2478,13 @@ int supplicant_start(struct supplicant *s)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
/* add initial 200ms startup timer */
|
/* 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,
|
&s->timer_source,
|
||||||
shl_now(CLOCK_MONOTONIC) + 200 * 1000ULL,
|
CLOCK_MONOTONIC,
|
||||||
0,
|
shl_now(CLOCK_MONOTONIC) + 200 * 1000ULL,
|
||||||
supplicant_timer_fn,
|
0,
|
||||||
s);
|
supplicant_timer_fn,
|
||||||
|
s);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
log_vERR(r);
|
log_vERR(r);
|
||||||
goto error;
|
goto error;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue