]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Tue May 20 13:46:46 EDT 2008 Pekka.Pessi@nokia.com
authorMichael Jerris <mike@jerris.com>
Sun, 25 May 2008 15:14:40 +0000 (15:14 +0000)
committerMichael Jerris <mike@jerris.com>
Sun, 25 May 2008 15:14:40 +0000 (15:14 +0000)
  * tport.c: fixed klocwork issues

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8627 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/sofia-sip/.update
libs/sofia-sip/libsofia-sip-ua/tport/tport.c

index a18190171eabc1337b0cfb4725df037dae3eb77c..570531c85b34ff3cd07b73928e1b117f3f5cb24d 100644 (file)
@@ -1 +1 @@
-Sun May 25 11:12:25 EDT 2008
+Sun May 25 11:13:45 EDT 2008
index dcbfa9c9e2016b61bd0c355ad6bb7101b263f4b2..c4a86b48d309cbdce149d265d7191319a624c8a9 100644 (file)
@@ -1178,7 +1178,6 @@ int tport_get_params(tport_t const *self,
   ta_list ta;
   int n;
   tport_params_t const *tpp;
-  tport_primary_t const *pri = self->tp_pri;
   int connect;
 
   if (self == NULL)
@@ -1207,7 +1206,9 @@ int tport_get_params(tport_t const *self,
               TPTAG_THRPRQSIZE(tpp->tpp_thrprqsize),
               TPTAG_SIGCOMP_LIFETIME(tpp->tpp_sigcomp_lifetime),
               TPTAG_STUN_SERVER(tpp->tpp_stun_server),
-              TAG_IF(pri, TPTAG_PUBLIC(pri ? pri->pri_public : 0)),
+              TAG_IF(self->tp_pri,
+                     TPTAG_PUBLIC(self->tp_pri ?
+                                  self->tp_pri->pri_public : 0)),
               TPTAG_TOS(tpp->tpp_tos),
               TAG_END());
 
@@ -2956,7 +2957,7 @@ void tport_deliver(tport_t *self,
 #if SU_HAVE_IN6
     if (su->su_family == AF_INET6) {
       ipaddr[0] = '[';
-      su_inet_ntop(su->su_family, SU_ADDR(su), ipaddr + 1, sizeof(ipaddr) - 1);
+      su_inet_ntop(su->su_family, SU_ADDR(su), ipaddr + 1, SU_ADDRSIZE);
       strcat(ipaddr, "]");
     }
     else {
@@ -4680,7 +4681,9 @@ int tport_name_dup(su_home_t *home,
     n_canon = 0;
 
   s = su_alloc(home, n_proto + n_canon + n_host + n_port + n_comp);
-  
+  if (s == NULL)
+    return -1;
+
   if (n_proto)
     dst->tpn_proto = memcpy(s, src->tpn_proto, n_proto), s += n_proto;
   else