mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 19:10:17 +01:00
dispatcher: tolerate lack of connection path
If the dispatcher is being invoked because the connection was removed
(e.g. device going down), it doesn't have a path or a filename anymore.
Don't abort in such cases.
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/205
(cherry picked from commit 0c62445853)
This commit is contained in:
parent
23d244dee1
commit
cbf5d13584
1 changed files with 2 additions and 6 deletions
|
|
@ -456,12 +456,8 @@ nm_dispatcher_utils_construct_envp (const char *action,
|
|||
goto done;
|
||||
|
||||
/* Connection properties */
|
||||
if (!g_variant_lookup (connection_props, NMD_CONNECTION_PROPS_PATH, "&o", &path)) {
|
||||
*out_error_message = "Missing or invalid required value " NMD_CONNECTION_PROPS_PATH "!";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
_items_add_key (items, NULL, "CONNECTION_DBUS_PATH", path);
|
||||
if (g_variant_lookup (connection_props, NMD_CONNECTION_PROPS_PATH, "&o", &path))
|
||||
_items_add_key (items, NULL, "CONNECTION_DBUS_PATH", path);
|
||||
|
||||
if (g_variant_lookup (connection_props, NMD_CONNECTION_PROPS_EXTERNAL, "b", &external) && external)
|
||||
_items_add_str (items, "CONNECTION_EXTERNAL=1");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue