diff options
author | Tom Gundersen <teg@jklm.no> | 2015-09-30 18:17:43 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-10-21 03:24:23 +0200 |
commit | 84de38c56915e14c148f558c6acc489a00755696 (patch) | |
tree | e63d3a633e98f990e6eece6b0eed9eb827235238 /src/network/networkd.h | |
parent | e7780c8d44ee32ecf6127f45c0188483c041e2e5 (diff) |
networkd: manager/link - only serialize once per event-loop iteration
Every time the state is written out we may trigger third-party apps, so
let's be a bit more careful about writing this out unnecessarily.
Diffstat (limited to 'src/network/networkd.h')
-rw-r--r-- | src/network/networkd.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/network/networkd.h b/src/network/networkd.h index cbec6d5b7e..6c5a9939be 100644 --- a/src/network/networkd.h +++ b/src/network/networkd.h @@ -48,7 +48,10 @@ struct Manager { struct udev_monitor *udev_monitor; sd_event_source *udev_event_source; - bool enumerating; + bool enumerating:1; + bool dirty:1; + + Set *dirty_links; char *state_file; LinkOperationalState operational_state; @@ -83,7 +86,7 @@ int manager_rtnl_enumerate_addresses(Manager *m); int manager_rtnl_process_address(sd_netlink *nl, sd_netlink_message *message, void *userdata); int manager_send_changed(Manager *m, const char *property, ...) _sentinel_; -int manager_save(Manager *m); +void manager_dirty(Manager *m); int manager_address_pool_acquire(Manager *m, int family, unsigned prefixlen, union in_addr_union *found); |