1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 09:21:26 +03:00

sd-lldp-rx: sd_event should be attached when lldp_rx_start_timer() is called

This commit is contained in:
Yu Watanabe 2021-09-28 15:41:19 +09:00
parent 3e4a202519
commit 92466b8da2

View File

@ -426,6 +426,7 @@ static int lldp_rx_start_timer(sd_lldp_rx *lldp_rx, sd_lldp_neighbor *neighbor)
sd_lldp_neighbor *n;
assert(lldp_rx);
assert(lldp_rx->event);
if (neighbor)
lldp_neighbor_start_ttl(neighbor);
@ -434,9 +435,6 @@ static int lldp_rx_start_timer(sd_lldp_rx *lldp_rx, sd_lldp_neighbor *neighbor)
if (!n)
return event_source_disable(lldp_rx->timer_event_source);
if (!lldp_rx->event)
return 0;
return event_reset_time(lldp_rx->event, &lldp_rx->timer_event_source,
clock_boottime_or_monotonic(),
n->until, 0,