Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libnice
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
libnice
Commits
b7c2eabf
Commit
b7c2eabf
authored
Feb 15, 2016
by
Olivier Crête
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug: Enable based on G_MESSAGES_DEBUG
parent
acfe2b1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
agent/debug.c
agent/debug.c
+17
-2
No files found.
agent/debug.c
View file @
b7c2eabf
...
@@ -65,6 +65,15 @@ static const GDebugKey keys[] = {
...
@@ -65,6 +65,15 @@ static const GDebugKey keys[] = {
{
NULL
,
0
},
{
NULL
,
0
},
};
};
static
const
GDebugKey
gkeys
[]
=
{
{
(
gchar
*
)
"libnice-stun"
,
NICE_DEBUG_STUN
},
{
(
gchar
*
)
"libnice"
,
NICE_DEBUG_NICE
},
{
(
gchar
*
)
"libnice-pseudotcp"
,
NICE_DEBUG_PSEUDOTCP
},
{
(
gchar
*
)
"libnice-pseudotcp-verbose"
,
NICE_DEBUG_PSEUDOTCP_VERBOSE
},
{
(
gchar
*
)
"libnice-verbose"
,
NICE_DEBUG_NICE_VERBOSE
},
{
NULL
,
0
},
};
static
void
static
void
stun_handler
(
const
char
*
format
,
va_list
ap
)
G_GNUC_PRINTF
(
1
,
0
);
stun_handler
(
const
char
*
format
,
va_list
ap
)
G_GNUC_PRINTF
(
1
,
0
);
...
@@ -89,6 +98,8 @@ void nice_debug_init (void)
...
@@ -89,6 +98,8 @@ void nice_debug_init (void)
if
(
flags_string
)
if
(
flags_string
)
flags
=
g_parse_debug_string
(
flags_string
,
keys
,
4
);
flags
=
g_parse_debug_string
(
flags_string
,
keys
,
4
);
if
(
gflags_string
)
flags
|=
g_parse_debug_string
(
gflags_string
,
gkeys
,
4
);
if
(
gflags_string
&&
strstr
(
gflags_string
,
"libnice-pseudotcp-verbose"
))
if
(
gflags_string
&&
strstr
(
gflags_string
,
"libnice-pseudotcp-verbose"
))
flags
|=
NICE_DEBUG_PSEUDOTCP_VERBOSE
;
flags
|=
NICE_DEBUG_PSEUDOTCP_VERBOSE
;
if
(
gflags_string
&&
strstr
(
gflags_string
,
"libnice-nice-verbose"
))
{
if
(
gflags_string
&&
strstr
(
gflags_string
,
"libnice-nice-verbose"
))
{
...
@@ -96,7 +107,11 @@ void nice_debug_init (void)
...
@@ -96,7 +107,11 @@ void nice_debug_init (void)
}
}
stun_set_debug_handler
(
stun_handler
);
stun_set_debug_handler
(
stun_handler
);
nice_debug_enable
(
TRUE
);
debug_enabled
=
!!
(
flags
&
NICE_DEBUG_NICE
);
if
(
flags
&
NICE_DEBUG_STUN
)
stun_debug_enable
();
else
stun_debug_disable
();
if
(
flags
&
NICE_DEBUG_NICE_VERBOSE
)
if
(
flags
&
NICE_DEBUG_NICE_VERBOSE
)
debug_verbose_enabled
=
TRUE
;
debug_verbose_enabled
=
TRUE
;
...
@@ -106,7 +121,7 @@ void nice_debug_init (void)
...
@@ -106,7 +121,7 @@ void nice_debug_init (void)
pseudotcp flag in order to actually enable verbose pseudotcp */
pseudotcp flag in order to actually enable verbose pseudotcp */
if
(
flags
&
NICE_DEBUG_PSEUDOTCP_VERBOSE
)
if
(
flags
&
NICE_DEBUG_PSEUDOTCP_VERBOSE
)
pseudo_tcp_set_debug_level
(
PSEUDO_TCP_DEBUG_VERBOSE
);
pseudo_tcp_set_debug_level
(
PSEUDO_TCP_DEBUG_VERBOSE
);
else
else
if
(
flags
&
NICE_DEBUG_PSEUDOTCP
)
pseudo_tcp_set_debug_level
(
PSEUDO_TCP_DEBUG_NORMAL
);
pseudo_tcp_set_debug_level
(
PSEUDO_TCP_DEBUG_NORMAL
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment