[Freeswitch-svn] [commit] r8590 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/tport

Freeswitch SVN mikej at freeswitch.org
Sat May 24 23:03:59 EDT 2008


Author: mikej
Date: Sat May 24 23:03:58 2008
New Revision: 8590

Modified:
   freeswitch/trunk/libs/sofia-sip/.update
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_tag.c
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tcp.c

Log:
Mon May 19 11:53:23 EDT 2008  Pekka Pessi <first.last at nokia.com>
  * tport_type_tcp.c: report EPIPE when transport gets closed after ping-pong timeout



Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update	(original)
+++ freeswitch/trunk/libs/sofia-sip/.update	Sat May 24 23:03:58 2008
@@ -1 +1 @@
-Wed May 21 00:25:55 CEST 2008
+Sat May 24 23:03:50 EDT 2008

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_tag.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_tag.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_tag.c	Sat May 24 23:03:58 2008
@@ -226,7 +226,7 @@
  * If true, respond with PONG to PING. Default value is 0 (false).
  *
  * If set, the ping-pong protocol is used on TCP connections. If a ping (at
- * least 4 whitespace characters) is received within messages, a pong
+ * least 4 whitespace characters) is received between messages, a pong
  * (CR-LF) is sent in response.
  *
  * Use with tport_tcreate(), tport_tbind(), tport_set_params(), nua_create(),

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tcp.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tcp.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tcp.c	Sat May 24 23:03:58 2008
@@ -277,7 +277,8 @@
     if (n <= 0)
       return (int)n;
 
-    SU_DEBUG_7(("%s(%p): received keepalive\n", __func__, (void *)self));
+    SU_DEBUG_7(("%s(%p): received keepalive (total %u)\n", __func__,
+		(void *)self, self->tp_ping));
 
     N -= n, self->tp_ping += n;
 
@@ -449,7 +450,9 @@
 		  __func__, (void *)self,
 		  "closing connection", TPN_ARGS(self->tp_name), 
 		  " because of PONG timeout"));
-      tport_close(self);
+      tport_error_report(self, EPIPE, NULL);
+      if (!self->tp_closed)
+	tport_close(self);
       return;
     }
   }



More information about the Freeswitch-svn mailing list