mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-27 16:09:20 +00:00
Merge branch 'master' of git.sv.gnu.org:/srv/git/linphone
This commit is contained in:
commit
81f48c52ed
1 changed files with 5 additions and 1 deletions
|
|
@ -337,13 +337,17 @@ int sal_listen_port(Sal *ctx, const char *addr, int port, SalTransport tr, int i
|
|||
int err;
|
||||
bool_t ipv6;
|
||||
int proto=IPPROTO_UDP;
|
||||
int keepalive = ctx->keepalive_period;
|
||||
|
||||
switch (tr) {
|
||||
case SalTransportDatagram:
|
||||
proto=IPPROTO_UDP;
|
||||
eXosip_set_option (EXOSIP_OPT_UDP_KEEP_ALIVE, &keepalive);
|
||||
break;
|
||||
case SalTransportStream:
|
||||
proto= IPPROTO_TCP;
|
||||
keepalive=-1;
|
||||
eXosip_set_option (EXOSIP_OPT_UDP_KEEP_ALIVE,&keepalive);
|
||||
break;
|
||||
default:
|
||||
ms_warning("unexpected proto, using datagram");
|
||||
|
|
@ -364,7 +368,7 @@ int sal_listen_port(Sal *ctx, const char *addr, int port, SalTransport tr, int i
|
|||
#ifdef HAVE_EXOSIP_GET_SOCKET
|
||||
ms_message("Exosip has socket number %i",eXosip_get_socket(proto));
|
||||
#endif
|
||||
eXosip_set_option (EXOSIP_OPT_UDP_KEEP_ALIVE, &ctx->keepalive_period);
|
||||
|
||||
ctx->running=TRUE;
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue