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
61e01c6b
Commit
61e01c6b
authored
Feb 19, 2013
by
Yann Diorcet
Browse files
Disable keep alive when using uPnP
parent
9cb68a7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
coreapi/linphonecore.c
coreapi/linphonecore.c
+10
-3
No files found.
coreapi/linphonecore.c
View file @
61e01c6b
...
...
@@ -4239,7 +4239,9 @@ void linphone_core_set_firewall_policy(LinphoneCore *lc, LinphoneFirewallPolicy
ms_warning
(
"UPNP is not available, reset firewall policy to no firewall"
);
pol
=
LinphonePolicyNoFirewall
;
}
#else //BUILD_UPNP
#endif //BUILD_UPNP
lc
->
net_conf
.
firewall_policy
=
pol
;
#ifdef BUILD_UPNP
if
(
pol
==
LinphonePolicyUseUpnp
)
{
if
(
lc
->
upnp
==
NULL
)
{
lc
->
upnp
=
linphone_upnp_context_new
(
lc
);
...
...
@@ -4249,9 +4251,9 @@ void linphone_core_set_firewall_policy(LinphoneCore *lc, LinphoneFirewallPolicy
linphone_upnp_context_destroy
(
lc
->
upnp
);
lc
->
upnp
=
NULL
;
}
}
}
linphone_core_enable_keep_alive
(
lc
,
(
lc
->
sip_conf
.
keepalive_period
>
0
));
#endif //BUILD_UPNP
lc
->
net_conf
.
firewall_policy
=
pol
;
if
(
lc
->
sip_conf
.
contact
)
update_primary_contact
(
lc
);
if
(
linphone_core_ready
(
lc
))
lp_config_set_int
(
lc
->
config
,
"net"
,
"firewall_policy"
,
pol
);
...
...
@@ -5490,6 +5492,11 @@ const char *linphone_error_to_string(LinphoneReason err){
* Enables signaling keep alive
*/
void
linphone_core_enable_keep_alive
(
LinphoneCore
*
lc
,
bool_t
enable
)
{
#ifdef BUILD_UPNP
if
(
linphone_core_get_firewall_policy
(
lc
)
==
LinphonePolicyUseUpnp
)
{
enable
=
FALSE
;
}
#endif //BUILD_UPNP
if
(
enable
>
0
)
{
sal_use_tcp_tls_keepalive
(
lc
->
sal
,
lc
->
sip_conf
.
tcp_tls_keepalive
);
sal_set_keepalive_period
(
lc
->
sal
,
lc
->
sip_conf
.
keepalive_period
);
...
...
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