diff options
author | Thomas Haller <thaller@redhat.com> | 2018-04-21 13:25:57 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-04-22 10:19:35 +0200 |
commit | 3cedc1bf533081809c9ec60e064ee3b497578b13 (patch) | |
tree | 002f287529a738c6743a3721af2d732c928fccbc /src/nm-dbus-utils.h | |
parent | 0a24b6ce90d86eaf9a91c63b1982171b9f038b5b (diff) | |
download | NetworkManager-th/core-fixes-for-shutdown.tar.gz |
core/dbus: stop NMDBusManager and reject future method callsth/core-fixes-for-shutdown
During shutdown, we will need to still iterate the main loop
to do a coordinated shutdown. Currently we do not, and we just
exit, leaving a lot of objects hanging.
If we are going to fix that, we need during shutdown tell
NMDBusManager to reject all future operations.
Note that property getters and "GetManagerObjects" call is not
blocked. It continues to work.
Certainly for some operations, we want to allow them to be called even
during shutdown. However, these have to opt-in.
This also fixes an uglyness, where nm_dbus_manager_start() would
get the set-property-handler and the @manager as user-data. However,
NMDBusManager will always outlife NMManager, hence, after NMManager
is destroyed, the user-data would be a dangling pointer. Currently
that is not an issue, because
- we always leak NMManager
- we don't run the mainloop during shutdown
Diffstat (limited to 'src/nm-dbus-utils.h')
-rw-r--r-- | src/nm-dbus-utils.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nm-dbus-utils.h b/src/nm-dbus-utils.h index e7e930e938..1f8e96c4c9 100644 --- a/src/nm-dbus-utils.h +++ b/src/nm-dbus-utils.h @@ -122,6 +122,7 @@ typedef struct _NMDBusMethodInfoExtended { const char *sender, GDBusMethodInvocation *invocation, GVariant *parameters); + bool allow_during_shutdown; } NMDBusMethodInfoExtended; #define NM_DEFINE_DBUS_METHOD_INFO_EXTENDED(parent_, ...) \ |