From 966ecb6a03136eed08fe5b407d1f486c3b8f41d8 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Thu, 3 Feb 2011 16:06:33 +0100 Subject: [PATCH] disable sip keepalive in tcp --- coreapi/sal_eXosip2.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/coreapi/sal_eXosip2.c b/coreapi/sal_eXosip2.c index b993d88bd..4d1de476a 100644 --- a/coreapi/sal_eXosip2.c +++ b/coreapi/sal_eXosip2.c @@ -336,13 +336,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"); @@ -363,7 +367,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; }