]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
don't choose 0 port for proxy mode
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 22 Mar 2013 15:34:31 +0000 (10:34 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 22 Mar 2013 15:34:31 +0000 (10:34 -0500)
src/mod/endpoints/mod_sofia/sofia_glue.c

index 0d764391bdedda2bee0967816fdb3a30b92e1827..6e3dde6407658c069f43cab89fc37b795d4e48a4 100644 (file)
@@ -1541,7 +1541,11 @@ switch_status_t sofia_glue_tech_proxy_remote_addr(private_object_t *tech_pvt, co
        }
 
        if ((p = (char *) switch_stristr("m=image ", sdp_str))) {
-               port_ptr = p + 8;
+               char *tmp = p + 8;
+
+               if (tmp && atoi(tmp)) {
+                       port_ptr = tmp;
+               }
        }
 
        if ((p = (char *) switch_stristr("m=video ", sdp_str))) {