Commit 5ea30721 authored by Youness Alaoui's avatar Youness Alaoui

export the nice_debug_en/disable API and add a boolean to access the stun debug

parent 8182fb8c
......@@ -102,7 +102,7 @@ test_fallback_LDADD = $(COMMON_LDADD)
test_thread_LDADD = $(COMMON_LDADD)
pkginclude_HEADERS = agent.h candidate.h
pkginclude_HEADERS = agent.h candidate.h debug.h
all-local:
chmod a+x $(srcdir)/check-test-fullmode-with-stun.sh
......@@ -45,6 +45,7 @@
#include "address.h"
#include "candidate.h"
#include "random.h"
#include "debug.h"
G_BEGIN_DECLS
......
......@@ -39,15 +39,20 @@
#include "debug.h"
#include <glib.h>
#include "stunagent.h"
static int debug_enabled = 1;
void nice_debug_enable (void) {
void nice_debug_enable (gboolean with_stun) {
debug_enabled = 1;
if (with_stun)
stun_debug_enable ();
}
void nice_debug_disable (void) {
void nice_debug_disable (gboolean with_stun) {
debug_enabled = 0;
if (with_stun)
stun_debug_disable ();
}
void nice_debug (const char *fmt, ...)
......
......@@ -36,8 +36,10 @@
#ifndef _DEBUG_H
#define _DEBUG_H
void nice_debug_enable (void);
void nice_debug_disable (void);
#include <glib.h>
void nice_debug_enable (gboolean with_stun);
void nice_debug_disable (gboolean with_stun);
void nice_debug (const char *fmt, ...);
#endif /* _DEBUG_H */
......
......@@ -39,6 +39,8 @@ nice_candidate_ice_priority_full
nice_candidate_jingle_priority
nice_candidate_new
nice_candidate_pair_priority
nice_debug_enable
nice_debug_disable
nice_interface_free
nice_interface_new
nice_list_local_interfaces
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment