summary refs log tree commit diff
path: root/src/nm-exported-object.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2016-03-01 16:55:22 +0100
committerMichael Biebl <biebl@debian.org>2016-03-01 16:55:22 +0100
commitc2de0d98ba39e0a1a970d066fd19be786092f376 (patch)
tree3838363c06a6019db6cf1f882ea34ebded63c38b /src/nm-exported-object.c
parent494f296a3baab08522617b24b1f126d8f9a17502 (diff)
Imported Upstream version 1.1.91 upstream/1.1.91
Diffstat (limited to 'src/nm-exported-object.c')
-rw-r--r--src/nm-exported-object.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/nm-exported-object.c b/src/nm-exported-object.c
index ca3187e8..b6d30aab 100644
--- a/src/nm-exported-object.c
+++ b/src/nm-exported-object.c
@@ -18,14 +18,13 @@
  * Copyright 2014-2015 Red Hat, Inc.
  */
 
-#include "config.h"
+#include "nm-default.h"
 
 #include <stdarg.h>
 #include <string.h>
 
 #include "nm-exported-object.h"
 #include "nm-bus-manager.h"
-#include "nm-default.h"
 
 static GHashTable *prefix_counters;
 static gboolean quitting = FALSE;
@@ -538,6 +537,7 @@ nm_exported_object_export (NMExportedObject *self)
 	NMExportedObjectPrivate *priv;
 	const char *class_export_path, *p;
 	GType type;
+	char *path;
 
 	g_return_val_if_fail (NM_IS_EXPORTED_OBJECT (self), NULL);
 	priv = NM_EXPORTED_OBJECT_GET_PRIVATE (self);
@@ -568,12 +568,9 @@ nm_exported_object_export (NMExportedObject *self)
 			g_hash_table_insert (prefix_counters, g_strdup (class_export_path), counter);
 		}
 
-		priv->path = g_strdup_printf (class_export_path, (*counter)++);
+		path = g_strdup_printf (class_export_path, (*counter)++);
 	} else
-		priv->path = g_strdup (class_export_path);
-
-	_LOGT ("export: \"%s\"", priv->path);
-	g_dbus_object_skeleton_set_object_path (G_DBUS_OBJECT_SKELETON (self), priv->path);
+		path = g_strdup (class_export_path);
 
 	type = G_OBJECT_TYPE (self);
 	while (type != NM_TYPE_EXPORTED_OBJECT) {
@@ -581,6 +578,10 @@ nm_exported_object_export (NMExportedObject *self)
 		type = g_type_parent (type);
 	}
 
+	priv->path = path;
+	_LOGT ("export: \"%s\"", priv->path);
+	g_dbus_object_skeleton_set_object_path (G_DBUS_OBJECT_SKELETON (self), priv->path);
+
 	/* Important: priv->path and priv->interfaces must not change while
 	 * the object is registered. */