mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-18 06:08:31 +03:00
host: Always initialize libosmocore logging before using it
This avoids related ASSERTs or error messages in case any of the libosmocore / libosmousb API functions internally tries to log something. Change-Id: I611c435516856c5c8928d7810fd9a9b831adc199
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
#include <errno.h>
|
||||
|
||||
#include <osmocom/core/utils.h>
|
||||
#include <osmocom/core/logging.h>
|
||||
#include <osmocom/core/application.h>
|
||||
|
||||
#include <osmocom/usb/libusb.h>
|
||||
#include <osmocom/simtrace2/simtrace_usb.h>
|
||||
@@ -71,8 +73,11 @@ static int find_devices(void)
|
||||
return num_interfaces;
|
||||
}
|
||||
|
||||
static struct log_info log_info = {};
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
osmo_init_logging2(NULL, &log_info);
|
||||
osmo_libusb_init(NULL);
|
||||
find_devices();
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user