target: Export records for device targets as well
authorSamuel Ortiz <sameo@linux.intel.com>
Thu, 15 Dec 2011 18:15:57 +0000 (19:15 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 15 Dec 2011 18:16:47 +0000 (19:16 +0100)
src/target.c

index 589db6f..0285f63 100644 (file)
@@ -232,7 +232,9 @@ static DBusMessage *get_properties(DBusConnection *conn,
                near_dbus_dict_append_array(&dict, "Protocols",
                                DBUS_TYPE_STRING, append_protocols, target);
 
-       if (target->type == NEAR_TARGET_TYPE_TAG) {
+       if (target->type == NEAR_TARGET_TYPE_TAG ||
+                       (target->type == NEAR_TARGET_TYPE_DEVICE &&
+                                       target->tag != NULL)) {
                near_dbus_dict_append_array(&dict, "TagType",
                                DBUS_TYPE_STRING, append_tag_type, target);