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:
parent
3e4a202519
commit
92466b8da2
@ -426,6 +426,7 @@ static int lldp_rx_start_timer(sd_lldp_rx *lldp_rx, sd_lldp_neighbor *neighbor)
|
|||||||
sd_lldp_neighbor *n;
|
sd_lldp_neighbor *n;
|
||||||
|
|
||||||
assert(lldp_rx);
|
assert(lldp_rx);
|
||||||
|
assert(lldp_rx->event);
|
||||||
|
|
||||||
if (neighbor)
|
if (neighbor)
|
||||||
lldp_neighbor_start_ttl(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)
|
if (!n)
|
||||||
return event_source_disable(lldp_rx->timer_event_source);
|
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,
|
return event_reset_time(lldp_rx->event, &lldp_rx->timer_event_source,
|
||||||
clock_boottime_or_monotonic(),
|
clock_boottime_or_monotonic(),
|
||||||
n->until, 0,
|
n->until, 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user