mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-06-19 08:58:28 +02: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
This commit is contained in:
parent
3c6644db32
commit
0c62445853
1 changed files with 2 additions and 6 deletions
|
|
@ -490,12 +490,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