Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mediastreamer2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
mediastreamer2
Commits
6bed7490
Commit
6bed7490
authored
Jul 26, 2012
by
Ghislain MARY
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delay RE-INVITE sending for 1 second as defined in RFC5245 section 8.1.2.
parent
078c0116
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
ice.h
include/mediastreamer2/ice.h
+2
-0
ice.c
src/ice.c
+12
-4
No files found.
include/mediastreamer2/ice.h
View file @
6bed7490
...
...
@@ -107,6 +107,8 @@ typedef struct _IceSession {
uint32_t
ta
;
/**< Duration of timer for sending connectivity checks in ms */
uint8_t
max_connectivity_checks
;
/**< Configuration parameter to limit the number of connectivity checks performed by the agent (default is 100) */
uint8_t
keepalive_timeout
;
/**< Configuration parameter to define the timeout between each keepalive packets (default is 15s) */
uint64_t
event_time
;
/**< Time when an event must be sent */
bool_t
send_event
;
/**< Boolean value telling whether an event must be sent or not */
}
IceSession
;
/**
...
...
src/ice.c
View file @
6bed7490
...
...
@@ -164,6 +164,8 @@ static void ice_session_init(IceSession *session)
session
->
local_pwd
[
24
]
=
'\0'
;
session
->
remote_ufrag
=
NULL
;
session
->
remote_pwd
=
NULL
;
session
->
event_time
=
0
;
session
->
send_event
=
FALSE
;
}
IceSession
*
ice_session_new
(
void
)
...
...
@@ -1905,7 +1907,6 @@ static int ice_find_unsuccessful_check_list(IceCheckList *cl, const void *dummy)
static
void
ice_continue_processing_on_next_check_list
(
IceCheckList
*
cl
,
RtpSession
*
rtp_session
)
{
OrtpEvent
*
ev
;
MSList
*
elem
=
ms_list_find
(
cl
->
session
->
streams
,
cl
);
if
(
elem
==
NULL
)
{
ms_error
(
"ice: Could not find check list in the session"
);
...
...
@@ -1918,9 +1919,8 @@ static void ice_continue_processing_on_next_check_list(IceCheckList *cl, RtpSess
if
(
elem
==
NULL
)
{
/* All the check lists of the session have completed successfully. */
cl
->
session
->
state
=
IS_Completed
;
ev
=
ortp_event_new
(
ORTP_EVENT_ICE_SESSION_PROCESSING_FINISHED
);
ortp_event_get_data
(
ev
)
->
info
.
ice_processing_successful
=
TRUE
;
rtp_session_dispatch_event
(
rtp_session
,
ev
);
cl
->
session
->
event_time
=
cl
->
session
->
ticker
->
time
+
1000
;
cl
->
session
->
send_event
=
TRUE
;
}
else
{
// TODO: Each all the check list processing failed, notify the application
}
...
...
@@ -2031,6 +2031,14 @@ void ice_check_list_process(IceCheckList *cl, RtpSession *rtp_session)
ice_send_keepalive_packets
(
cl
,
rtp_session
);
cl
->
keepalive_time
=
curtime
;
}
/* Send event if needed. */
if
((
cl
->
session
->
send_event
==
TRUE
)
&&
(
curtime
>=
cl
->
session
->
event_time
))
{
OrtpEvent
*
ev
;
cl
->
session
->
send_event
=
FALSE
;
ev
=
ortp_event_new
(
ORTP_EVENT_ICE_SESSION_PROCESSING_FINISHED
);
ortp_event_get_data
(
ev
)
->
info
.
ice_processing_successful
=
TRUE
;
rtp_session_dispatch_event
(
rtp_session
,
ev
);
}
/* No break to be able to respond to connectivity checks. */
case
ICL_Running
:
/* Check if some retransmissions are needed. */
...
...
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