From 11da5fb6bcd654bfdcba66ca1b094d70d9cabe9a Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 6 Mar 2012 12:00:41 -0600 Subject: [PATCH] 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. --- src/nm-manager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nm-manager.c b/src/nm-manager.c index efdd0f462f..d42375a3fe 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -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; }