laforge has submitted this change. (
https://gerrit.osmocom.org/c/osmo-remsim/+/16628 )
Change subject: remsim-client: Query + Store the USB device path
......................................................................
remsim-client: Query + Store the USB device path
While the user may have specified a USB path at the command line
(or not), let's make sure we obtain the actual path after opening
the respective USB device.
Change-Id: I7e707c74647f4c5db06d495d369b2e69e2fc7c97
---
M src/client/simtrace2-remsim_client.c
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/client/simtrace2-remsim_client.c
b/src/client/simtrace2-remsim_client.c
index 173b890..846ce85 100644
--- a/src/client/simtrace2-remsim_client.c
+++ b/src/client/simtrace2-remsim_client.c
@@ -87,6 +87,7 @@
/* slot on which this card emulation instance runs */
struct st_slot *slot;
struct cardemu_usb_msg_status last_status;
+ char *usb_path;
};
/* global GSMTAP instance */
@@ -993,6 +994,10 @@
return;
}
+ /* (re)determine the USB path of the opened device */
+ talloc_free(ci->usb_path);
+ ci->usb_path = osmo_libusb_dev_get_path_c(ci,
libusb_get_device(transp->usb_devh));
+
rc = libusb_claim_interface(transp->usb_devh, cfg->usb.if_num);
if (rc < 0) {
fprintf(stderr, "can't claim interface %d; rc=%d\n",
cfg->usb.if_num, rc);
--
To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16628
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: I7e707c74647f4c5db06d495d369b2e69e2fc7c97
Gerrit-Change-Number: 16628
Gerrit-PatchSet: 8
Gerrit-Owner: laforge <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-MessageType: merged