summaryrefslogtreecommitdiff
path: root/src/systemd
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2014-04-09 13:12:09 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2014-04-11 10:53:52 +0300
commit56cd007ab83749b85670c9c7f560e083980c2ff4 (patch)
treebcad53e6e2595084a768154a8dff72f3814f8534 /src/systemd
parent781ca7a13feb01739a9aa8b629ff1ff7c51e74aa (diff)
sd-ipv4ll: Add reference counting for IPv4LL
Similar to DHCP, the IPv4LL library user can decide to free the LL client any time the callback is called. Guard against freeing the LL client in the callback by introducing proper reference counting. Also update code using the IPv4LL library to properly handle a returned NULL from the notify and stop functions if the IPv4LL client was freed.
Diffstat (limited to 'src/systemd')
-rw-r--r--src/systemd/sd-ipv4ll.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/systemd/sd-ipv4ll.h b/src/systemd/sd-ipv4ll.h
index 28405a1d3..d01715815 100644
--- a/src/systemd/sd-ipv4ll.h
+++ b/src/systemd/sd-ipv4ll.h
@@ -47,7 +47,8 @@ int sd_ipv4ll_set_address_seed(sd_ipv4ll *ll, uint8_t seed[8]);
bool sd_ipv4ll_is_running(sd_ipv4ll *ll);
int sd_ipv4ll_start(sd_ipv4ll *ll);
int sd_ipv4ll_stop(sd_ipv4ll *ll);
-void sd_ipv4ll_free(sd_ipv4ll *ll);
-int sd_ipv4ll_new(sd_ipv4ll **ret);
+sd_ipv4ll *sd_ipv4ll_ref(sd_ipv4ll *ll);
+sd_ipv4ll *sd_ipv4ll_unref(sd_ipv4ll *ll);
+int sd_ipv4ll_new (sd_ipv4ll **ret);
#endif