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
8c0ad69d
Commit
8c0ad69d
authored
Nov 12, 2008
by
Youness Alaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
free ufrag and password returned by get_local_credentials
parent
282e8dae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
7 deletions
+39
-7
agent/test-fullmode.c
agent/test-fullmode.c
+29
-5
agent/test-restart.c
agent/test-restart.c
+10
-2
No files found.
agent/test-fullmode.c
View file @
8c0ad69d
...
...
@@ -390,13 +390,17 @@ static int run_full_test (NiceAgent *lagent, NiceAgent *ragent, NiceAddress *bas
/* step: pass the remote candidates to agents */
//cands = g_slist_append (NULL, &cdes);
{
const
gchar
*
ufrag
=
NULL
,
*
password
=
NULL
;
gchar
*
ufrag
=
NULL
,
*
password
=
NULL
;
nice_agent_get_local_credentials
(
lagent
,
ls_id
,
&
ufrag
,
&
password
);
nice_agent_set_remote_credentials
(
ragent
,
rs_id
,
ufrag
,
password
);
g_free
(
ufrag
);
g_free
(
password
);
nice_agent_get_local_credentials
(
ragent
,
rs_id
,
&
ufrag
,
&
password
);
nice_agent_set_remote_credentials
(
lagent
,
ls_id
,
ufrag
,
password
);
g_free
(
ufrag
);
g_free
(
password
);
}
/* cdes.component_id = NICE_COMPONENT_TYPE_RTP;
cdes.addr = raddr;
...
...
@@ -544,13 +548,17 @@ static int run_full_test_delayed_answer (NiceAgent *lagent, NiceAgent *ragent, N
/* step: pass the remote candidates to agent R (answering party) */
{
const
gchar
*
ufrag
=
NULL
,
*
password
=
NULL
;
gchar
*
ufrag
=
NULL
,
*
password
=
NULL
;
nice_agent_get_local_credentials
(
lagent
,
ls_id
,
&
ufrag
,
&
password
);
nice_agent_set_remote_credentials
(
ragent
,
rs_id
,
ufrag
,
password
);
g_free
(
ufrag
);
g_free
(
password
);
nice_agent_get_local_credentials
(
ragent
,
rs_id
,
&
ufrag
,
&
password
);
nice_agent_set_remote_credentials
(
lagent
,
ls_id
,
ufrag
,
password
);
g_free
(
ufrag
);
g_free
(
password
);
}
/* step: set remote candidates for agent R (answering party) */
cands
=
g_slist_append
(
NULL
,
&
cdes
);
...
...
@@ -574,13 +582,17 @@ static int run_full_test_delayed_answer (NiceAgent *lagent, NiceAgent *ragent, N
/* step: pass the remote candidates to agent L (offering party) */
{
const
gchar
*
ufrag
=
NULL
,
*
password
=
NULL
;
gchar
*
ufrag
=
NULL
,
*
password
=
NULL
;
nice_agent_get_local_credentials
(
ragent
,
rs_id
,
&
ufrag
,
&
password
);
nice_agent_set_remote_credentials
(
lagent
,
ls_id
,
ufrag
,
password
);
g_free
(
ufrag
);
g_free
(
password
);
nice_agent_get_local_credentials
(
ragent
,
rs_id
,
&
ufrag
,
&
password
);
nice_agent_set_remote_credentials
(
lagent
,
ls_id
,
ufrag
,
password
);
g_free
(
ufrag
);
g_free
(
password
);
}
/* step: pass remove candidates to agent L (offering party) */
...
...
@@ -698,19 +710,25 @@ static int run_full_test_wrong_password (NiceAgent *lagent, NiceAgent *ragent, N
raddr
=
cand
->
addr
;
}
}
for
(
i
=
cands
;
i
;
i
=
i
->
next
)
nice_candidate_free
((
NiceCandidate
*
)
i
->
data
);
g_slist_free
(
cands
);
g_debug
(
"test-fullmode: Got local candidates..."
);
/* step: pass the remote candidates to agents */
cands
=
g_slist_append
(
NULL
,
&
cdes
);
{
const
gchar
*
ufrag
=
NULL
,
*
password
=
NULL
;
gchar
*
ufrag
=
NULL
,
*
password
=
NULL
;
nice_agent_get_local_credentials
(
lagent
,
ls_id
,
&
ufrag
,
&
password
);
nice_agent_set_remote_credentials
(
ragent
,
rs_id
,
"wrong"
,
password
);
g_free
(
ufrag
);
g_free
(
password
);
nice_agent_get_local_credentials
(
ragent
,
rs_id
,
&
ufrag
,
&
password
);
nice_agent_set_remote_credentials
(
lagent
,
ls_id
,
ufrag
,
"wrong2"
);
g_free
(
ufrag
);
g_free
(
password
);
}
cdes
.
addr
=
raddr
;
nice_agent_set_remote_candidates
(
lagent
,
ls_id
,
NICE_COMPONENT_TYPE_RTP
,
cands
);
...
...
@@ -819,19 +837,25 @@ static int run_full_test_control_conflict (NiceAgent *lagent, NiceAgent *ragent,
raddr
=
cand
->
addr
;
}
}
for
(
i
=
cands
;
i
;
i
=
i
->
next
)
nice_candidate_free
((
NiceCandidate
*
)
i
->
data
);
g_slist_free
(
cands
);
g_debug
(
"test-fullmode: Got local candidates..."
);
/* step: pass the remote candidates to agents */
cands
=
g_slist_append
(
NULL
,
&
cdes
);
{
const
gchar
*
ufrag
=
NULL
,
*
password
=
NULL
;
gchar
*
ufrag
=
NULL
,
*
password
=
NULL
;
nice_agent_get_local_credentials
(
lagent
,
ls_id
,
&
ufrag
,
&
password
);
nice_agent_set_remote_credentials
(
ragent
,
rs_id
,
ufrag
,
password
);
g_free
(
ufrag
);
g_free
(
password
);
nice_agent_get_local_credentials
(
ragent
,
rs_id
,
&
ufrag
,
&
password
);
nice_agent_set_remote_credentials
(
lagent
,
ls_id
,
ufrag
,
password
);
g_free
(
ufrag
);
g_free
(
password
);
}
cdes
.
addr
=
raddr
;
nice_agent_set_remote_candidates
(
lagent
,
ls_id
,
NICE_COMPONENT_TYPE_RTP
,
cands
);
...
...
agent/test-restart.c
View file @
8c0ad69d
...
...
@@ -276,13 +276,17 @@ static int run_restart_test (NiceAgent *lagent, NiceAgent *ragent, NiceAddress *
/* step: pass the remote candidates to agents */
cands
=
g_slist_append
(
NULL
,
&
cdes
);
{
const
gchar
*
ufrag
=
NULL
,
*
password
=
NULL
;
gchar
*
ufrag
=
NULL
,
*
password
=
NULL
;
nice_agent_get_local_credentials
(
lagent
,
ls_id
,
&
ufrag
,
&
password
);
nice_agent_set_remote_credentials
(
ragent
,
rs_id
,
ufrag
,
password
);
g_free
(
ufrag
);
g_free
(
password
);
nice_agent_get_local_credentials
(
ragent
,
rs_id
,
&
ufrag
,
&
password
);
nice_agent_set_remote_credentials
(
lagent
,
ls_id
,
ufrag
,
password
);
g_free
(
ufrag
);
g_free
(
password
);
}
cdes
.
component_id
=
NICE_COMPONENT_TYPE_RTP
;
cdes
.
addr
=
raddr
;
...
...
@@ -328,13 +332,17 @@ static int run_restart_test (NiceAgent *lagent, NiceAgent *ragent, NiceAddress *
g_assert
(
tie_breaker
!=
ragent
->
tie_breaker
);
nice_agent_restart
(
lagent
);
{
const
gchar
*
ufrag
=
NULL
,
*
password
=
NULL
;
gchar
*
ufrag
=
NULL
,
*
password
=
NULL
;
nice_agent_get_local_credentials
(
lagent
,
ls_id
,
&
ufrag
,
&
password
);
nice_agent_set_remote_credentials
(
ragent
,
rs_id
,
ufrag
,
password
);
g_free
(
ufrag
);
g_free
(
password
);
nice_agent_get_local_credentials
(
ragent
,
rs_id
,
&
ufrag
,
&
password
);
nice_agent_set_remote_credentials
(
lagent
,
ls_id
,
ufrag
,
password
);
g_free
(
ufrag
);
g_free
(
password
);
}
/* send another packet after restart */
...
...
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