From f7c4dd79f50e81c14a318ace40845df63e8758b3 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Tue, 11 Feb 2014 05:40:41 +0000 Subject: [PATCH] Add additional debugging output to keepalive handling --- .../sofia-sip/libsofia-sip-ua/tport/tport_type_tcp.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tcp.c b/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tcp.c index 14601f49ff..d42547c582 100644 --- a/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tcp.c +++ b/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tcp.c @@ -202,12 +202,16 @@ int tport_tcp_init_secondary(tport_t *self, int socket, int accepted, __func__, (void *)self, self->tp_params->tpp_keepalive)); #if defined(TCP_KEEPIDLE) - if (val != 0 && val != UINT_MAX) - setsockopt(socket, SOL_TCP, TCP_KEEPIDLE, (void *)&val, sizeof val); + if (val != 0 && val != UINT_MAX) { + SU_DEBUG_3(("%s(%p): Setting TCP_KEEPIDLE to %d\n", + __func__, (void *)self, val)); + setsockopt(socket, SOL_TCP, TCP_KEEPIDLE, (void *)&val, sizeof val);} #endif #if defined(TCP_KEEPINTVL) - if (val != 0 && val != UINT_MAX) - setsockopt(socket, SOL_TCP, TCP_KEEPINTVL, (void *)&val, sizeof val); + if (val != 0 && val != UINT_MAX) { + SU_DEBUG_3(("%s(%p): Setting TCP_KEEPINTVL to %d\n", + __func__, (void *)self, val)); + setsockopt(socket, SOL_TCP, TCP_KEEPINTVL, (void *)&val, sizeof val);} #endif if (!accepted)