]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-3475 --resolve
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 2 Aug 2011 18:51:57 +0000 (13:51 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 2 Aug 2011 18:51:57 +0000 (13:51 -0500)
libs/sofia-sip/.update
libs/sofia-sip/libsofia-sip-ua/tport/tport_logging.c

index 02a17b54a0d2aa47d747867e8dfc5f787a5bde77..c2a60933c6a1f21b50f9c158df6fff5913814442 100644 (file)
@@ -1 +1 @@
-Mon Aug  1 10:01:41 CDT 2011
+Tue Aug  2 13:51:40 CDT 2011
index a3e7532c966c8c3fc201055506b64ef62366ad76..fe23ce433ab947f76beead0dba0933c2d444a32f 100644 (file)
@@ -416,11 +416,15 @@ void tport_capt_msg(tport_t const *self, msg_t *msg, size_t n,
        buflen += sizeof(struct hep_iphdr);      
    }
 #if SU_HAVE_IN6   
-   else {
+   else if(su->su_family == AF_INET6) {
        memcpy(buffer+buflen, &hep_ip6header, sizeof(struct hep_ip6hdr));
        buflen += sizeof(struct hep_ip6hdr);   
    }   
-#endif             
+#endif 
+   else {
+       su_perror("error: tport_logging: capture: unsupported protocol family");
+       goto done;
+   }           
    
    for (i = 0; i < iovused && n > 0; i++) {
        size_t len = iov[i].mv_len;
@@ -437,14 +441,16 @@ void tport_capt_msg(tport_t const *self, msg_t *msg, size_t n,
    
    /* check if we have error i.e. capture server is down */
    if ((error = su_soerror(mr->mr_capt_sock))) {
-      su_perror("capture socket error");
-      return;
+      su_perror("error: tport_logging: capture socket error");
+      goto done;
    }
 
    su_send(mr->mr_capt_sock, buffer, buflen, 0);   
 
+done:
    /* Now we release it */
    if(buffer) free(buffer);  
+   return;
 }