mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-07 07:18:03 +02:00
libnm-glib: better debugging of property accesses and updates
Need to initialize libnm-util to get GValue transforms registered so the property values print out as strings. Then actually print some debugging information about properties.
This commit is contained in:
parent
57bd84139f
commit
7f9fe7601e
2 changed files with 16 additions and 0 deletions
|
|
@ -1236,6 +1236,8 @@ constructed (GObject *object)
|
||||||
DBusGConnection *connection;
|
DBusGConnection *connection;
|
||||||
NMClientPrivate *priv;
|
NMClientPrivate *priv;
|
||||||
|
|
||||||
|
nm_utils_init (NULL);
|
||||||
|
|
||||||
G_OBJECT_CLASS (nm_client_parent_class)->constructed (object);
|
G_OBJECT_CLASS (nm_client_parent_class)->constructed (object);
|
||||||
|
|
||||||
priv = NM_CLIENT_GET_PRIVATE (object);
|
priv = NM_CLIENT_GET_PRIVATE (object);
|
||||||
|
|
|
||||||
|
|
@ -757,7 +757,21 @@ handle_property_changed (NMObject *self, const char *dbus_name, GValue *value, g
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
{
|
||||||
|
char *s;
|
||||||
|
s = g_strdup_value_contents (value);
|
||||||
|
g_message ("PC: %p (%s) prop (%s) '%s' value (%s) %s",
|
||||||
|
self, G_OBJECT_TYPE_NAME (self),
|
||||||
|
g_type_name (pspec->value_type), prop_name,
|
||||||
|
G_VALUE_TYPE_NAME (value), s);
|
||||||
|
g_free (s);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (pi->object_type) {
|
if (pi->object_type) {
|
||||||
|
#if DEBUG
|
||||||
|
g_message (" Value is object type %s", g_type_name (pi->object_type));
|
||||||
|
#endif
|
||||||
if (G_VALUE_HOLDS (value, DBUS_TYPE_G_OBJECT_PATH))
|
if (G_VALUE_HOLDS (value, DBUS_TYPE_G_OBJECT_PATH))
|
||||||
success = handle_object_property (self, pspec->name, value, pi, synchronously);
|
success = handle_object_property (self, pspec->name, value, pi, synchronously);
|
||||||
else if (G_VALUE_HOLDS (value, DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH))
|
else if (G_VALUE_HOLDS (value, DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue