Skip to content
Snippets Groups Projects
Commit 5a017a70 authored by Jakob Olsson's avatar Jakob Olsson
Browse files

libmobile: add function to set library debugging level

parent f4102d3a
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
static const char *const ZTE = "usb0"; static const char *const ZTE = "usb0";
static const char *const HILINK = "eth5"; static const char *const HILINK = "eth5";
// check other libraries to maintain similar structure, libwifi, libethernet, libdsl int lib_debug = 0;
struct json_object *mobile_set_pin(struct dongle *dev, char *current_pin, char *new_pin) struct json_object *mobile_set_pin(struct dongle *dev, char *current_pin, char *new_pin)
{ {
if (strcmp(dev->if_name, ZTE) == 0) if (strcmp(dev->if_name, ZTE) == 0)
...@@ -295,3 +296,14 @@ struct json_object *mobile_get_system_info(struct dongle *dev) ...@@ -295,3 +296,14 @@ struct json_object *mobile_get_system_info(struct dongle *dev)
return NULL; return NULL;
} }
void *set_lib_debug(int debug_level)
{
if (debug_level > 1 || debug_level < 0) {
lib_debug_print("Only debug levels 0 and 1 are available for the library debugging\n");
return;
}
lib_debug = debug_level;
lib_debug_print("debug level %d\n", lib_debug);
}
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#define LIBMOBILE_H #define LIBMOBILE_H
#include "lib_commons.h" #include "lib_commons.h"
/** /**
* Holds information about a mounted mobile dongle. * Holds information about a mounted mobile dongle.
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment