Change in osmo-remsim[master]: client: Enable libusb logging

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sat Dec 14 22:59:58 UTC 2019


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/16593 )


Change subject: client: Enable libusb logging
......................................................................

client: Enable libusb logging

Change-Id: I4818a3cd405ff042bb5748ec377c9042b825a395
---
M src/simtrace2-remsim_client.c
1 file changed, 8 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/93/16593/1

diff --git a/src/simtrace2-remsim_client.c b/src/simtrace2-remsim_client.c
index 622f150..633b69e 100644
--- a/src/simtrace2-remsim_client.c
+++ b/src/simtrace2-remsim_client.c
@@ -701,6 +701,11 @@
 	{ NULL, 0, 0, 0 }
 };
 
+static void usb_log_cb(libusb_context *uctx, enum libusb_log_level level, const char *str)
+{
+	fprintf(stderr, "USB: %s", str);
+}
+
 int main(int argc, char **argv)
 {
 	struct rspro_server_conn *srvc, *bankdc;
@@ -804,6 +809,9 @@
 		goto do_exit;
 	}
 
+	libusb_set_log_cb(NULL, usb_log_cb, LIBUSB_LOG_CB_GLOBAL);
+	libusb_set_option(NULL, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_INFO);
+
 	g_gti = gsmtap_source_init(gsmtap_host, GSMTAP_UDP_PORT, 0);
 	if (!g_gti) {
 		perror("unable to open GSMTAP");

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/16593
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: I4818a3cd405ff042bb5748ec377c9042b825a395
Gerrit-Change-Number: 16593
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191214/a65e7b03/attachment.htm>


More information about the gerrit-log mailing list