diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-06-14 14:37:21 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-06-30 10:35:27 +0200 |
commit | 71193c0b629c76ec511dd222d6b68a52c4df132d (patch) | |
tree | b8104d1c11755d28c8bc421043877854042f433b /src/network/netdev | |
parent | 7d9337ed77b08ee691568172e7c074d2b5d8e15e (diff) | |
download | systemd-71193c0b629c76ec511dd222d6b68a52c4df132d.tar.gz |
sd-event: allow sd_event_source_is_enabled() to return false for NULL
This is a natural use case, and instead of defining a wrapper to do this
for us, let's just make this part of the API. Calling with NULL was not
allowed, so this is not a breaking change to the interface.
(After sd_event_source_is_enabled was originally added, we introduced
sd_event_source_disable_unref() and other similar functions which accept
NULL. So not accepting NULL here is likely to confuse people. Let's just
make the API usable with minimal fuss.)
Diffstat (limited to 'src/network/netdev')
-rw-r--r-- | src/network/netdev/wireguard.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/netdev/wireguard.c b/src/network/netdev/wireguard.c index 2667a9fb2a..99ec09c641 100644 --- a/src/network/netdev/wireguard.c +++ b/src/network/netdev/wireguard.c @@ -405,7 +405,7 @@ static int peer_resolve_endpoint(WireguardPeer *peer) { /* Not necessary to resolve the endpoint. */ return 0; - if (event_source_is_enabled(peer->resolve_retry_event_source) > 0) + if (sd_event_source_get_enabled(peer->resolve_retry_event_source, NULL) > 0) /* Timer event source is enabled. The endpoint will be resolved later. */ return 0; |