Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
liblinphone
Commits
fd852f01
Commit
fd852f01
authored
Jul 17, 2012
by
Ghislain MARY
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add configuration parameter to enable ICE.
parent
c4bf7958
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
127 additions
and
75 deletions
+127
-75
console/commands.c
console/commands.c
+13
-0
coreapi/linphonecore.h
coreapi/linphonecore.h
+2
-1
gtk/parameters.ui
gtk/parameters.ui
+104
-74
gtk/propertybox.c
gtk/propertybox.c
+8
-0
No files found.
console/commands.c
View file @
fd852f01
...
...
@@ -850,6 +850,16 @@ lpc_cmd_firewall(LinphoneCore *lc, char *args)
{
linphone_core_set_firewall_policy
(
lc
,
LinphonePolicyNoFirewall
);
}
else
if
(
strcmp
(
args
,
"ice"
)
==
0
)
{
setting
=
linphone_core_get_stun_server
(
lc
);
if
(
!
setting
)
{
linphonec_out
(
"No stun server address is defined, use 'stun <address>' first
\n
"
);
return
1
;
}
linphone_core_set_firewall_policy
(
lc
,
LinphonePolicyUseIce
);
}
else
if
(
strcmp
(
args
,
"stun"
)
==
0
)
{
setting
=
linphone_core_get_stun_server
(
lc
);
...
...
@@ -883,6 +893,9 @@ lpc_cmd_firewall(LinphoneCore *lc, char *args)
case
LinphonePolicyUseNatAddress
:
linphonec_out
(
"Using supplied nat address %s.
\n
"
,
setting
?
setting
:
linphone_core_get_nat_address
(
lc
));
break
;
case
LinphonePolicyUseIce
:
linphonec_out
(
"Using ice with stun server %s to discover firewall address
\n
"
,
setting
?
setting
:
linphone_core_get_stun_server
(
lc
));
break
;
}
return
1
;
}
...
...
coreapi/linphonecore.h
View file @
fd852f01
...
...
@@ -740,7 +740,8 @@ typedef struct _LCCallbackObj
typedef
enum
_LinphoneFirewallPolicy
{
LinphonePolicyNoFirewall
,
LinphonePolicyUseNatAddress
,
LinphonePolicyUseStun
LinphonePolicyUseStun
,
LinphonePolicyUseIce
}
LinphoneFirewallPolicy
;
typedef
enum
_LinphoneWaitingState
{
...
...
gtk/parameters.ui
View file @
fd852f01
This diff is collapsed.
Click to expand it.
gtk/propertybox.c
View file @
fd852f01
...
...
@@ -171,6 +171,11 @@ void linphone_gtk_use_stun_toggled(GtkWidget *w){
linphone_core_set_firewall_policy
(
linphone_gtk_get_core
(),
LinphonePolicyUseStun
);
}
void
linphone_gtk_use_ice_toggled
(
GtkWidget
*
w
){
if
(
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
w
)))
linphone_core_set_firewall_policy
(
linphone_gtk_get_core
(),
LinphonePolicyUseIce
);
}
void
linphone_gtk_mtu_changed
(
GtkWidget
*
w
){
if
(
GTK_WIDGET_SENSITIVE
(
w
))
linphone_core_set_mtu
(
linphone_gtk_get_core
(),
gtk_spin_button_get_value
(
GTK_SPIN_BUTTON
(
w
)));
...
...
@@ -956,6 +961,9 @@ void linphone_gtk_show_parameters(void){
case
LinphonePolicyUseStun
:
gtk_toggle_button_set_active
(
GTK_TOGGLE_BUTTON
(
linphone_gtk_get_widget
(
pb
,
"use_stun"
)),
TRUE
);
break
;
case
LinphonePolicyUseIce
:
gtk_toggle_button_set_active
(
GTK_TOGGLE_BUTTON
(
linphone_gtk_get_widget
(
pb
,
"use_ice"
)),
TRUE
);
break
;
}
mtu
=
linphone_core_get_mtu
(
lc
);
if
(
mtu
<=
0
){
...
...
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