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
3d1f2845
Commit
3d1f2845
authored
Apr 01, 2015
by
jehan
Browse files
add both sip and ftp bind address
parent
0b7ff73b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
8 deletions
+12
-8
coreapi/linphonecall.c
coreapi/linphonecall.c
+3
-2
coreapi/linphonecore.c
coreapi/linphonecore.c
+8
-5
linphone.spec.in
linphone.spec.in
+1
-1
No files found.
coreapi/linphonecall.c
View file @
3d1f2845
...
...
@@ -555,7 +555,7 @@ static void transfer_already_assigned_payload_types(SalMediaDescription *old, Sa
}
static
const
char
*
linphone_call_get_bind_ip_for_stream
(
LinphoneCall
*
call
,
int
stream_index
){
const
char
*
bind_ip
=
call
->
af
==
AF_INET6
?
"::0"
:
"0.0.0.0"
;
const
char
*
bind_ip
=
lp_config_get_string
(
call
->
core
->
config
,
"rtp"
,
"bind_address"
,
call
->
af
==
AF_INET6
?
"::0"
:
"0.0.0.0"
);
;
if
(
stream_index
<
2
&&
call
->
media_ports
[
stream_index
].
multicast_ip
[
0
]
!=
'\0'
){
if
(
call
->
dir
==
LinphoneCallOutgoing
){
...
...
@@ -611,7 +611,8 @@ void linphone_call_make_local_media_description(LinphoneCore *lc, LinphoneCall *
md
->
nb_streams
=
(
call
->
biggestdesc
?
call
->
biggestdesc
->
nb_streams
:
1
);
strncpy
(
md
->
addr
,
call
->
localip
,
sizeof
(
md
->
addr
));
strncpy
(
md
->
username
,
linphone_address_get_username
(
addr
),
sizeof
(
md
->
username
));
if
(
linphone_address_get_username
(
addr
))
/*might be null in case of identity without userinfo*/
strncpy
(
md
->
username
,
linphone_address_get_username
(
addr
),
sizeof
(
md
->
username
));
if
(
subject
)
strncpy
(
md
->
name
,
subject
,
sizeof
(
md
->
name
));
if
(
call
->
params
->
down_bw
)
...
...
coreapi/linphonecore.c
View file @
3d1f2845
...
...
@@ -2239,7 +2239,7 @@ int _linphone_core_apply_transports(LinphoneCore *lc){
Sal
*
sal
=
lc
->
sal
;
const
char
*
anyaddr
;
LCSipTransports
*
tr
=&
lc
->
sip_conf
.
transports
;
const
char
*
listening_address
;
/*first of all invalidate all current registrations so that we can register again with new transports*/
__linphone_core_invalidate_registers
(
lc
);
...
...
@@ -2249,24 +2249,27 @@ int _linphone_core_apply_transports(LinphoneCore *lc){
anyaddr
=
"0.0.0.0"
;
sal_unlisten_ports
(
sal
);
listening_address
=
lp_config_get_string
(
lc
->
config
,
"sip"
,
"bind_address"
,
anyaddr
);
if
(
lc
->
tunnel
&&
linphone_tunnel_sip_enabled
(
lc
->
tunnel
)
&&
linphone_tunnel_get_activated
(
lc
->
tunnel
)){
if
(
sal_listen_port
(
sal
,
anyaddr
,
tr
->
udp_port
,
SalTransportUDP
,
TRUE
)
!=
0
){
transport_error
(
lc
,
"udp+tunnel"
,
tr
->
udp_port
);
}
}
else
{
if
(
tr
->
udp_port
!=
0
){
if
(
sal_listen_port
(
sal
,
any
addr
,
tr
->
udp_port
,
SalTransportUDP
,
FALSE
)
!=
0
){
if
(
sal_listen_port
(
sal
,
listening_
addr
ess
,
tr
->
udp_port
,
SalTransportUDP
,
FALSE
)
!=
0
){
transport_error
(
lc
,
"udp"
,
tr
->
udp_port
);
}
}
if
(
tr
->
tcp_port
!=
0
){
if
(
sal_listen_port
(
sal
,
any
addr
,
tr
->
tcp_port
,
SalTransportTCP
,
FALSE
)
!=
0
){
if
(
sal_listen_port
(
sal
,
listening_
addr
ess
,
tr
->
tcp_port
,
SalTransportTCP
,
FALSE
)
!=
0
){
transport_error
(
lc
,
"tcp"
,
tr
->
tcp_port
);
}
}
if
(
linphone_core_sip_transport_supported
(
lc
,
LinphoneTransportTls
)){
if
(
tr
->
tls_port
!=
0
){
if
(
sal_listen_port
(
sal
,
any
addr
,
tr
->
tls_port
,
SalTransportTLS
,
FALSE
)
!=
0
){
if
(
sal_listen_port
(
sal
,
listening_
addr
ess
,
tr
->
tls_port
,
SalTransportTLS
,
FALSE
)
!=
0
){
transport_error
(
lc
,
"tls"
,
tr
->
tls_port
);
}
}
...
...
@@ -2327,7 +2330,7 @@ int linphone_core_set_sip_transports(LinphoneCore *lc, const LCSipTransports * t
/**
* Retrieves the port configuration used for each transport (udp, tcp, tls).
* A zero value port for a given transport means the transport
* is not used. A value of LC_SIP_TRANSPORT_RANDOM (-1) means the port is to be cho
o
sen randomly by the system.
* is not used. A value of LC_SIP_TRANSPORT_RANDOM (-1) means the port is to be chosen randomly by the system.
* @ingroup network_parameters
**/
int
linphone_core_get_sip_transports
(
LinphoneCore
*
lc
,
LCSipTransports
*
tr
){
...
...
linphone.spec.in
View file @
3d1f2845
...
...
@@ -38,7 +38,7 @@ over the internet. It has a gtk+ and console interface.
Summary: Development libraries for linphone
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: ortp-devel = @ORTP_VERSION@
Requires: ortp-devel =
1:
@ORTP_VERSION@
Requires: mediastreamer-devel = @MS2_VERSION@
Requires: glib2-devel
...
...
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