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
5662e1b0
Commit
5662e1b0
authored
Mar 07, 2011
by
Youness Alaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test-fullmode: add some debug output to track down a weird bug..
parent
6cf529b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
tests/test-fullmode.c
tests/test-fullmode.c
+10
-2
No files found.
tests/test-fullmode.c
View file @
5662e1b0
...
@@ -157,6 +157,7 @@ static gboolean timer_cb (gpointer pointer)
...
@@ -157,6 +157,7 @@ static gboolean timer_cb (gpointer pointer)
static
void
cb_writable
(
NiceAgent
*
agent
,
guint
stream_id
,
guint
component_id
)
static
void
cb_writable
(
NiceAgent
*
agent
,
guint
stream_id
,
guint
component_id
)
{
{
g_debug
(
"Transport is now writable, stopping mainloop"
);
g_main_loop_quit
(
global_mainloop
);
g_main_loop_quit
(
global_mainloop
);
}
}
...
@@ -176,6 +177,7 @@ static void cb_nice_recv (NiceAgent *agent, guint stream_id, guint component_id,
...
@@ -176,6 +177,7 @@ static void cb_nice_recv (NiceAgent *agent, guint stream_id, guint component_id,
return
;
return
;
if
(
GPOINTER_TO_UINT
(
user_data
)
==
2
)
{
if
(
GPOINTER_TO_UINT
(
user_data
)
==
2
)
{
g_debug
(
"right agent received %d bytes, stopping mainloop"
,
len
);
global_ragent_read
=
len
;
global_ragent_read
=
len
;
g_main_loop_quit
(
global_mainloop
);
g_main_loop_quit
(
global_mainloop
);
}
}
...
@@ -218,6 +220,7 @@ static void cb_component_state_changed (NiceAgent *agent, guint stream_id, guint
...
@@ -218,6 +220,7 @@ static void cb_component_state_changed (NiceAgent *agent, guint stream_id, guint
/* signal status via a global variable */
/* signal status via a global variable */
if
(
global_components_ready
==
global_components_ready_exit
&&
if
(
global_components_ready
==
global_components_ready_exit
&&
global_components_failed
==
global_components_failed_exit
)
{
global_components_failed
==
global_components_failed_exit
)
{
g_debug
(
"Components ready/failed achieved. Stopping mailoop"
);
g_main_loop_quit
(
global_mainloop
);
g_main_loop_quit
(
global_mainloop
);
return
;
return
;
}
}
...
@@ -266,8 +269,10 @@ static void cb_initial_binding_request_received(NiceAgent *agent, guint stream_i
...
@@ -266,8 +269,10 @@ static void cb_initial_binding_request_received(NiceAgent *agent, guint stream_i
else
if
(
GPOINTER_TO_UINT
(
data
)
==
2
)
else
if
(
GPOINTER_TO_UINT
(
data
)
==
2
)
global_ragent_ibr_received
=
TRUE
;
global_ragent_ibr_received
=
TRUE
;
if
(
global_exit_when_ibr_received
)
if
(
global_exit_when_ibr_received
)
{
g_main_loop_quit
(
global_mainloop
);
g_debug
(
"Received initial binding request. Stopping mailoop"
);
g_main_loop_quit
(
global_mainloop
);
}
/* XXX: dear compiler, these are for you: */
/* XXX: dear compiler, these are for you: */
(
void
)
agent
;
(
void
)
stream_id
;
(
void
)
data
;
(
void
)
agent
;
(
void
)
stream_id
;
(
void
)
data
;
...
@@ -458,16 +463,19 @@ static int run_full_test (NiceAgent *lagent, NiceAgent *ragent, NiceAddress *bas
...
@@ -458,16 +463,19 @@ static int run_full_test (NiceAgent *lagent, NiceAgent *ragent, NiceAddress *bas
{
{
gboolean
reliable
=
FALSE
;
gboolean
reliable
=
FALSE
;
g_object_get
(
G_OBJECT
(
lagent
),
"reliable"
,
&
reliable
,
NULL
);
g_object_get
(
G_OBJECT
(
lagent
),
"reliable"
,
&
reliable
,
NULL
);
g_debug
(
"Sending data returned -1 in %s mode"
,
reliable
?
"Reliable"
:
"Non-reliable"
);
if
(
reliable
)
{
if
(
reliable
)
{
gulong
signal_handler
;
gulong
signal_handler
;
signal_handler
=
g_signal_connect
(
G_OBJECT
(
lagent
),
signal_handler
=
g_signal_connect
(
G_OBJECT
(
lagent
),
"reliable-transport-writable"
,
G_CALLBACK
(
cb_writable
),
NULL
);
"reliable-transport-writable"
,
G_CALLBACK
(
cb_writable
),
NULL
);
g_debug
(
"Running mainloop until transport is writable"
);
g_main_loop_run
(
global_mainloop
);
g_main_loop_run
(
global_mainloop
);
g_signal_handler_disconnect
(
G_OBJECT
(
lagent
),
signal_handler
);
g_signal_handler_disconnect
(
G_OBJECT
(
lagent
),
signal_handler
);
ret
=
nice_agent_send
(
lagent
,
ls_id
,
1
,
16
,
"1234567812345678"
);
ret
=
nice_agent_send
(
lagent
,
ls_id
,
1
,
16
,
"1234567812345678"
);
}
}
}
}
g_debug
(
"Sent %d bytes"
,
ret
);
g_assert
(
ret
==
16
);
g_assert
(
ret
==
16
);
g_main_loop_run
(
global_mainloop
);
g_main_loop_run
(
global_mainloop
);
g_assert
(
global_ragent_read
==
16
);
g_assert
(
global_ragent_read
==
16
);
...
...
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