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

Freeswitch SVN mikej at freeswitch.org
Tue Aug 12 13:01:59 EDT 2008


Author: mikej
Date: Tue Aug 12 13:01:58 2008
New Revision: 9264

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

Log:
Sat Jul 12 10:08:48 EDT 2008  Pekka Pessi <first.last at nokia.com>
  * tport.c: checking for non-NULL pointer in predicate functions



Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update	(original)
+++ freeswitch/trunk/libs/sofia-sip/.update	Tue Aug 12 13:01:58 2008
@@ -1 +1 @@
-Tue Aug 12 13:00:08 EDT 2008
+Tue Aug 12 13:01:49 EDT 2008

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/tport/tport.c	Tue Aug 12 13:01:58 2008
@@ -196,31 +196,31 @@
 /** Test if transport has been registered to su_root_t */
 int tport_is_registered(tport_t const *self)
 {
-  return self->tp_index != 0;
+  return self && self->tp_index != 0;
 }
 
 /** Test if transport is stream. */
 int tport_is_stream(tport_t const *self)
 {
-  return self->tp_addrinfo->ai_socktype == SOCK_STREAM;
+  return self && self->tp_addrinfo->ai_socktype == SOCK_STREAM;
 }
  
 /** Test if transport is dgram. */
 int tport_is_dgram(tport_t const *self)
 {
-  return self->tp_addrinfo->ai_socktype == SOCK_DGRAM;
+  return self && self->tp_addrinfo->ai_socktype == SOCK_DGRAM;
 }
  
 /** Test if transport is udp. */
 int tport_is_udp(tport_t const *self)
 {
-  return self->tp_addrinfo->ai_protocol == IPPROTO_UDP;
+  return self && self->tp_addrinfo->ai_protocol == IPPROTO_UDP;
 }
  
 /** Test if transport is tcp. */
 int tport_is_tcp(tport_t const *self)
 {
-  return self->tp_addrinfo->ai_protocol == IPPROTO_TCP;
+  return self && self->tp_addrinfo->ai_protocol == IPPROTO_TCP;
 }
  
 /** Return 1 if transport is reliable, 0 otherwise.
@@ -242,7 +242,7 @@
  */
 int tport_is_public(tport_t const *self)
 {
-  return self->tp_pri->pri_public;
+  return self && self->tp_pri->pri_public;
 }
 
 /** Return true if transport supports IPv4 */



More information about the Freeswitch-svn mailing list