mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-02 15:21:43 +01:00
41 lines
1.4 KiB
Diff
41 lines
1.4 KiB
Diff
--- aravis-0.8.22-orig/src/arvuvdevice.c
|
|
+++ aravis-0.8.22/src/arvuvdevice.c
|
|
@@ -37,6 +37,7 @@
|
|
#include <arvstr.h>
|
|
#include <arvzip.h>
|
|
#include <arvmisc.h>
|
|
+#include <stdio.h>
|
|
|
|
enum
|
|
{
|
|
@@ -740,6 +741,13 @@
|
|
index = get_guid_index(devices[i]);
|
|
if (index > 0)
|
|
libusb_get_string_descriptor_ascii (usb_device, index, guid, 256);
|
|
+
|
|
+ /*
|
|
+ * When guid_index is wrongly equal to the product index, append the serial number
|
|
+ * Matching code in arvuvinterface.c
|
|
+ */
|
|
+ if (index == desc.iProduct)
|
|
+ snprintf((char *)guid, 256, "%s-%s", product, serial_number);
|
|
|
|
if ((priv->vendor != NULL &&
|
|
g_strcmp0 ((char * ) manufacturer, priv->vendor) == 0 &&
|
|
--- aravis-0.8.22-orig/src/arvuvinterface.c
|
|
+++ aravis-0.8.22/src/arvuvinterface.c
|
|
@@ -240,6 +240,13 @@
|
|
if (index > 0)
|
|
libusb_get_string_descriptor_ascii (device_handle, index, guid, 256);
|
|
|
|
+ /*
|
|
+ * When guid_index is wrongly equal to the product index, append the serial number
|
|
+ * Matching code in arvuvdevice.c
|
|
+ */
|
|
+ if (index == desc.iProduct)
|
|
+ snprintf((char *)guid, 256, "%s-%s", product, serial_nbr);
|
|
+
|
|
device_infos = arv_uv_interface_device_infos_new ((char *) manufacturer, (char *) product,
|
|
(char *) serial_nbr, (char *) guid);
|
|
g_hash_table_replace (uv_interface->priv->devices, device_infos->id,
|