mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 10:30:13 +01:00
core: handle NULL device path for activation
For virtual interfaces and other cases we won't necessarily have a device path, which means clients will be passing "/" instead. Fix that up the same way we fix up the specific object.
This commit is contained in:
parent
3567e6f9ea
commit
11da5fb6bc
1 changed files with 2 additions and 1 deletions
|
|
@ -733,13 +733,14 @@ pending_activation_new (NMManager *manager,
|
|||
pending->context = context;
|
||||
pending->callback = callback;
|
||||
|
||||
pending->device_path = g_strdup (device_path);
|
||||
pending->connection_path = g_strdup (connection_path);
|
||||
pending->connection = connection;
|
||||
|
||||
/* "/" is special-cased to NULL to get through D-Bus */
|
||||
if (specific_object_path && strcmp (specific_object_path, "/"))
|
||||
pending->specific_object_path = g_strdup (specific_object_path);
|
||||
if (device_path && strcmp (device_path, "/"))
|
||||
pending->device_path = g_strdup (device_path);
|
||||
|
||||
return pending;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue