[Pkg-running-devel] [openambit] 88/131: Fixed broken version handling. Fixing #29

Christian Perrier bubulle at moszumanska.debian.org
Thu Jul 17 20:19:14 UTC 2014


This is an automated email from the git hooks/post-receive script.

bubulle pushed a commit to branch master
in repository openambit.

commit 547c899410cac184479b125cdfdba92b07ba0d26
Author: Emil Ljungdahl <emil at kratern.se>
Date:   Sat Feb 15 15:44:50 2014 +0100

    Fixed broken version handling.
    Fixing #29
---
 src/libambit/libambit.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/libambit/libambit.c b/src/libambit/libambit.c
index b16a77c..8c5f3c7 100644
--- a/src/libambit/libambit.c
+++ b/src/libambit/libambit.c
@@ -114,16 +114,16 @@ ambit_object_t *libambit_detect(void)
             if (device_info_get(ret_object, &ret_object->device_info) == 0) {
                 // Let's resolve the correct device
                 for (i=0; i<sizeof(supported_devices)/sizeof(supported_devices[0]); i++) {
-                    if (device->vid == supported_devices[i].vid &&
-                        device->pid == supported_devices[i].pid &&
-                        strncmp(device->model, ret_object->device_info.model, LIBAMBIT_MODEL_NAME_LENGTH) == 0 &&
-                        (ret_object->device_info.fw_version[0] > device->min_sw_version[0] ||
-                         (ret_object->device_info.fw_version[0] == device->min_sw_version[0] &&
-                          (ret_object->device_info.fw_version[1] > device->min_sw_version[1] ||
-                           (ret_object->device_info.fw_version[1] == device->min_sw_version[1] &&
-                            (ret_object->device_info.fw_version[2] > device->min_sw_version[2] ||
-                             (ret_object->device_info.fw_version[2] == device->min_sw_version[2] &&
-                              (ret_object->device_info.fw_version[3] >= device->min_sw_version[3])))))))) {
+                    if (ret_object->vendor_id == supported_devices[i].vid &&
+                        ret_object->product_id == supported_devices[i].pid &&
+                        strncmp(ret_object->device_info.model, supported_devices[i].model, LIBAMBIT_MODEL_NAME_LENGTH) == 0 &&
+                        (ret_object->device_info.fw_version[0] > supported_devices[i].min_sw_version[0] ||
+                         (ret_object->device_info.fw_version[0] == supported_devices[i].min_sw_version[0] &&
+                          (ret_object->device_info.fw_version[1] > supported_devices[i].min_sw_version[1] ||
+                           (ret_object->device_info.fw_version[1] == supported_devices[i].min_sw_version[1] &&
+                            (ret_object->device_info.fw_version[2] > supported_devices[i].min_sw_version[2] ||
+                             (ret_object->device_info.fw_version[2] == supported_devices[i].min_sw_version[2] &&
+                              (ret_object->device_info.fw_version[3] >= supported_devices[i].min_sw_version[3])))))))) {
                         // Found matching entry, reset to this one!
                         device = &supported_devices[i];
                         break;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-running/openambit.git



More information about the Pkg-running-devel mailing list