diff options
| author | Thomas Haller <thaller@redhat.com> | 2016-05-30 14:53:27 +0200 |
|---|---|---|
| committer | Thomas Haller <thaller@redhat.com> | 2016-06-01 19:06:34 +0200 |
| commit | eb6140a7729db3eee2c95ddbbe65b12a31f29c43 (patch) | |
| tree | 84af382f1b83b282bd802ce14fd3288f3ab5a693 /src/nm-config-data.c | |
| parent | ec89bd517115f1593cbf6e624427ecd002f6b553 (diff) | |
| download | NetworkManager-eb6140a7729db3eee2c95ddbbe65b12a31f29c43.tar.gz | |
config: refactor change-flags to be a cause/reason which triggered the change
For the most part, this patch just renames some change-flags, but
doesn't change much about them. The new name should better express
what they are.
A config-change signal can be emitted for different reasons:
when we receive a signal (SIGHUP, SIGUSR1, SIGUSR2) or for internal
reasons like resetting of no-auto-default or setting internal
values.
Depending on the reason, we want to perform different actions.
For example:
- we reload the configuration from disk on SIGHUP, but not for
SIGUSR1.
- For SIGUSR1 and SIGHUP, we want to update-dns, but not for SIGUSR2.
Another part of the change-flags encodes which part of the configuration
actually changed. Often, these parts can only change when re-reading
from disk (e.g. a SIGUSR1 will not change any configuration inside
NMConfig).
Later, we will have more causes, and accordingly more fine-grained
effects of what should be done on reload.
Diffstat (limited to 'src/nm-config-data.c')
| -rw-r--r-- | src/nm-config-data.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nm-config-data.c b/src/nm-config-data.c index 1702b551cd..28057b47a6 100644 --- a/src/nm-config-data.c +++ b/src/nm-config-data.c @@ -1201,6 +1201,8 @@ nm_config_data_diff (NMConfigData *old_data, NMConfigData *new_data) if (!global_dns_equal (priv_old->global_dns, priv_new->global_dns)) changes |= NM_CONFIG_CHANGE_GLOBAL_DNS_CONFIG; + nm_assert (!NM_FLAGS_ANY (changes, NM_CONFIG_CHANGE_CAUSES)); + return changes; } |
