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
326bdea7
Commit
326bdea7
authored
Jul 02, 2008
by
Olivier Crête
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add check to make sure no stun packet is passed through
parent
71310d81
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
agent/test-fallback.c
agent/test-fallback.c
+8
-4
No files found.
agent/test-fallback.c
View file @
326bdea7
...
@@ -61,6 +61,7 @@ static int global_lagent_cands = 0;
...
@@ -61,6 +61,7 @@ static int global_lagent_cands = 0;
static
int
global_ragent_cands
=
0
;
static
int
global_ragent_cands
=
0
;
static
gint
global_ragent_read
=
0
;
static
gint
global_ragent_read
=
0
;
static
gint
global_ragent_read_exit
=
0
;
static
gint
global_ragent_read_exit
=
0
;
static
gboolean
global_accept_non_data
=
TRUE
;
static
void
priv_print_global_status
(
void
)
static
void
priv_print_global_status
(
void
)
{
{
...
@@ -89,10 +90,12 @@ static void cb_nice_recv (NiceAgent *agent, guint stream_id, guint component_id,
...
@@ -89,10 +90,12 @@ static void cb_nice_recv (NiceAgent *agent, guint stream_id, guint component_id,
/*
/*
* Lets ignore stun packets that got through
* Lets ignore stun packets that got through
*/
*/
if
(
len
!=
16
)
if
(
len
!=
16
||
strncmp
(
"1234567812345678"
,
buf
,
16
))
{
return
;
if
(
global_accept_non_data
)
if
(
strncmp
(
"1234567812345678"
,
buf
,
16
))
return
;
return
;
else
g_error
(
"Got non-data packet of lenght %u"
,
len
);
}
if
((
intptr_t
)
user_data
==
2
)
{
if
((
intptr_t
)
user_data
==
2
)
{
global_ragent_read
+=
len
;
global_ragent_read
+=
len
;
...
@@ -363,6 +366,7 @@ static int run_safe_fallback_test (NiceAgent *lagent, NiceAgent *ragent, NiceAdd
...
@@ -363,6 +366,7 @@ static int run_safe_fallback_test (NiceAgent *lagent, NiceAgent *ragent, NiceAdd
global_lagent_cands
=
global_lagent_cands
=
global_ragent_cands
=
0
;
global_ragent_cands
=
0
;
global_ragent_read_exit
=
-
1
;
global_ragent_read_exit
=
-
1
;
global_accept_non_data
=
FALSE
;
g_object_set
(
G_OBJECT
(
lagent
),
"controlling-mode"
,
TRUE
,
NULL
);
g_object_set
(
G_OBJECT
(
lagent
),
"controlling-mode"
,
TRUE
,
NULL
);
g_object_set
(
G_OBJECT
(
ragent
),
"controlling-mode"
,
FALSE
,
NULL
);
g_object_set
(
G_OBJECT
(
ragent
),
"controlling-mode"
,
FALSE
,
NULL
);
...
...
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