Prevent segfault in get_items()

One segfault resulted from an incorrect dbus call in sni_watcher. The
other from duplicate items in the sni host.
This commit is contained in:
Calvin Lee 2017-10-26 12:27:48 -06:00
parent 4231061e4d
commit 5bc46f458c
2 changed files with 30 additions and 18 deletions

View file

@ -389,9 +389,9 @@ static void get_property(DBusConnection *connection, DBusMessage *message) {
DBUS_TYPE_STRUCT, NULL, &dstruct);
dbus_message_iter_append_basic(&dstruct,
DBUS_TYPE_OBJECT_PATH, item->obj_path);
DBUS_TYPE_OBJECT_PATH, &item->obj_path);
dbus_message_iter_append_basic(&dstruct,
DBUS_TYPE_STRING, item->unique_name);
DBUS_TYPE_STRING, &item->unique_name);
dbus_message_iter_close_container(&array, &dstruct);
}