aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmicli
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2017-01-29 10:31:48 +0100
committerAleksander Morgado <aleksander@aleksander.es>2017-01-29 10:32:31 +0100
commitbffee13b741eaac0da2dd89ca2d2e8535cea87d8 (patch)
tree5f21b0930542ef5f28a55401a325a5de78fb9426 /src/qmicli
parenta5b41387239e7e590e60e5b1bcbb12d639fe2e93 (diff)
downloadexternal_libqmi-bffee13b741eaac0da2dd89ca2d2e8535cea87d8.zip
external_libqmi-bffee13b741eaac0da2dd89ca2d2e8535cea87d8.tar.gz
external_libqmi-bffee13b741eaac0da2dd89ca2d2e8535cea87d8.tar.bz2
qmicli: enable MBIM logs and traces if MBIM_QMUX enabled
Diffstat (limited to 'src/qmicli')
-rw-r--r--src/qmicli/Makefile.am2
-rw-r--r--src/qmicli/qmicli.c11
2 files changed, 13 insertions, 0 deletions
diff --git a/src/qmicli/Makefile.am b/src/qmicli/Makefile.am
index 90d0e53..eb3c574 100644
--- a/src/qmicli/Makefile.am
+++ b/src/qmicli/Makefile.am
@@ -5,6 +5,7 @@ bin_PROGRAMS = qmicli
qmicli_CPPFLAGS = \
$(GLIB_CFLAGS) \
+ $(MBIM_CFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/src/libqmi-glib \
-I$(top_srcdir)/src/libqmi-glib/generated \
@@ -27,6 +28,7 @@ qmicli_SOURCES = \
qmicli-voice.c
qmicli_LDADD = \
+ $(MBIM_LIBS) \
$(GLIB_LIBS) \
$(top_builddir)/src/libqmi-glib/libqmi-glib.la
diff --git a/src/qmicli/qmicli.c b/src/qmicli/qmicli.c
index 9038e98..00b4aad 100644
--- a/src/qmicli/qmicli.c
+++ b/src/qmicli/qmicli.c
@@ -32,6 +32,10 @@
#include <libqmi-glib.h>
+#if defined MBIM_QMUX_ENABLED
+#include <libmbim-glib.h>
+#endif
+
#include "qmicli.h"
#include "qmicli-helpers.h"
@@ -753,6 +757,13 @@ int main (int argc, char **argv)
if (verbose_flag)
qmi_utils_set_traces_enabled (TRUE);
+#if defined MBIM_QMUX_ENABLED
+ /* libmbim logging */
+ g_log_set_handler ("Mbim", G_LOG_LEVEL_MASK, log_handler, NULL);
+ if (verbose_flag)
+ mbim_utils_set_traces_enabled (TRUE);
+#endif
+
/* No device path given? */
if (!device_str) {
g_printerr ("error: no device path specified\n");