From a3a38d8a93f485893a321d24fdf4bf92dc789874 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 23 Dec 2012 07:48:31 -0800 Subject: [PATCH] core: Product and version info with 0x0000 are actually valid Only a Vendor with 0x0000 is invalid and so check for a valid vendor to decide to return product and version properties or not. --- src/device.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/device.c b/src/device.c index e7e70d363..76c82e12a 100644 --- a/src/device.c +++ b/src/device.c @@ -703,7 +703,7 @@ static gboolean dev_property_exists_product(const GDBusPropertyTable *property, if (device->vendor_src < 1 || device->vendor_src > 2) return FALSE; - return !!device->product; + return !!device->vendor; } static gboolean dev_property_get_product(const GDBusPropertyTable *property, @@ -714,7 +714,7 @@ static gboolean dev_property_get_product(const GDBusPropertyTable *property, if (device->vendor_src < 1 || device->vendor_src > 2) return FALSE; - if (!device->product) + if (!device->vendor) return FALSE; dbus_message_iter_append_basic(iter, DBUS_TYPE_UINT16, @@ -731,7 +731,7 @@ static gboolean dev_property_exists_version(const GDBusPropertyTable *property, if (device->vendor_src < 1 || device->vendor_src > 2) return FALSE; - return !!device->version; + return !!device->vendor; } static gboolean dev_property_get_version(const GDBusPropertyTable *property, @@ -742,7 +742,7 @@ static gboolean dev_property_get_version(const GDBusPropertyTable *property, if (device->vendor_src < 1 || device->vendor_src > 2) return FALSE; - if (!device->version) + if (!device->vendor) return FALSE; dbus_message_iter_append_basic(iter, DBUS_TYPE_UINT16, -- 2.47.3