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

move debug from library to application

parent 901996e3
Branches
No related tags found
No related merge requests found
...@@ -20,6 +20,14 @@ ...@@ -20,6 +20,14 @@
#include <libubox/blobmsg.h> #include <libubox/blobmsg.h>
#include <libubus.h> #include <libubus.h>
extern int debug;
#define debug_print(...) \
do \
{ \
if (debug) \
fprintf(stderr, __VA_ARGS__); \
} while (0)
/** /**
* Function: print_to_ubus * Function: print_to_ubus
* *
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include "dongle_network.h" #include "dongle_network.h"
struct ubus_context *ctx; struct ubus_context *ctx;
int debug;
static struct option long_options[] = static struct option long_options[] =
{ {
......
...@@ -4,16 +4,6 @@ ...@@ -4,16 +4,6 @@
#include <json-c/json.h> #include <json-c/json.h>
#include <string.h> #include <string.h>
int debug;
//#define DEBUG 1 //how to define from some sort of config? there is no main?
#define debug_print(...) \
do \
{ \
if (debug) \
fprintf(stderr, __VA_ARGS__); \
} while (0)
/*************************************************** /***************************************************
* Libmobile - A 4G Dongle library * Libmobile - A 4G Dongle library
* *
...@@ -269,4 +259,4 @@ struct json_object *mobile_set_pin(char *current_pin, char *new_pin); ...@@ -269,4 +259,4 @@ struct json_object *mobile_set_pin(char *current_pin, char *new_pin);
* NULL on failure. * NULL on failure.
*/ */
struct json_object *mobile_disable_pin(char *pin); struct json_object *mobile_disable_pin(char *pin);
#endif #endif
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment