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:
Dan Williams 2012-03-06 12:00:41 -06:00
parent 3567e6f9ea
commit 11da5fb6bc

View file

@ -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;
}