Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
685a0b31
Commit
685a0b31
authored
Feb 19, 2013
by
Yann Diorcet
Browse files
Fix uPnP dead lock
parent
61e01c6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
32 deletions
+30
-32
coreapi/upnp.c
coreapi/upnp.c
+30
-32
No files found.
coreapi/upnp.c
View file @
685a0b31
...
...
@@ -661,6 +661,11 @@ int linphone_upnp_call_process(LinphoneCall *call) {
*/
linphone_upnp_update_stream_state
(
call
->
upnp_session
->
video
);
/*
* Update stat
*/
linphone_core_update_upnp_state_in_call_stats
(
call
);
/*
* Update session state
*/
...
...
@@ -678,41 +683,34 @@ int linphone_upnp_call_process(LinphoneCall *call) {
call
->
upnp_session
->
state
=
LinphoneUpnpStateIdle
;
}
newState
=
call
->
upnp_session
->
state
;
/* When change is done proceed update */
if
(
oldState
!=
LinphoneUpnpStateOk
&&
oldState
!=
LinphoneUpnpStateKo
&&
(
call
->
upnp_session
->
state
==
LinphoneUpnpStateOk
||
call
->
upnp_session
->
state
==
LinphoneUpnpStateKo
))
{
if
(
call
->
upnp_session
->
state
==
LinphoneUpnpStateOk
)
ms_message
(
"uPnP IGD: uPnP for Call %p is ok"
,
call
);
else
ms_message
(
"uPnP IGD: uPnP for Call %p is ko"
,
call
);
switch
(
call
->
state
)
{
case
LinphoneCallUpdating
:
linphone_core_start_update_call
(
lc
,
call
);
break
;
case
LinphoneCallUpdatedByRemote
:
linphone_core_start_accept_call_update
(
lc
,
call
);
break
;
case
LinphoneCallOutgoingInit
:
linphone_core_proceed_with_invite_if_ready
(
lc
,
call
,
NULL
);
break
;
case
LinphoneCallIdle
:
linphone_core_notify_incoming_call
(
lc
,
call
);
break
;
default:
break
;
}
}
}
ms_mutex_unlock
(
&
lupnp
->
mutex
);
/*
* Update uPnP call stats
*/
if
(
oldState
!=
newState
)
{
linphone_core_update_upnp_state_in_call_stats
(
call
);
/* When change is done proceed update */
if
(
oldState
!=
LinphoneUpnpStateOk
&&
oldState
!=
LinphoneUpnpStateKo
&&
(
newState
==
LinphoneUpnpStateOk
||
newState
==
LinphoneUpnpStateKo
))
{
if
(
call
->
upnp_session
->
state
==
LinphoneUpnpStateOk
)
ms_message
(
"uPnP IGD: uPnP for Call %p is ok"
,
call
);
else
ms_message
(
"uPnP IGD: uPnP for Call %p is ko"
,
call
);
switch
(
call
->
state
)
{
case
LinphoneCallUpdating
:
linphone_core_start_update_call
(
lc
,
call
);
break
;
case
LinphoneCallUpdatedByRemote
:
linphone_core_start_accept_call_update
(
lc
,
call
);
break
;
case
LinphoneCallOutgoingInit
:
linphone_core_proceed_with_invite_if_ready
(
lc
,
call
,
NULL
);
break
;
case
LinphoneCallIdle
:
linphone_core_notify_incoming_call
(
lc
,
call
);
break
;
default:
break
;
}
}
return
ret
;
...
...
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