[Asterisk-cvs] asterisk/channels chan_iax2.c, 1.378.2.4, 1.378.2.5 chan_sip.c, 1.913.2.3, 1.913.2.4

kpfleming kpfleming
Mon Nov 21 14:42:15 CST 2005


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv25691/channels

Modified Files:
      Tag: v1-2
	chan_iax2.c chan_sip.c 
Log Message:
backport fix from HEAD branch


Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.378.2.4
retrieving revision 1.378.2.5
diff -u -d -r1.378.2.4 -r1.378.2.5
--- chan_iax2.c	21 Nov 2005 19:29:51 -0000	1.378.2.4
+++ chan_iax2.c	21 Nov 2005 19:31:26 -0000	1.378.2.5
@@ -8200,6 +8200,8 @@
 						free(peer);
 						return NULL;
 					}
+					if (!peer->addr.sin_port)
+						peer->addr.sin_port = htons(IAX_DEFAULT_PORTNO);
 				}
 				if (!maskfound)
 					inet_aton("255.255.255.255", &peer->mask);

Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.913.2.3
retrieving revision 1.913.2.4
diff -u -d -r1.913.2.3 -r1.913.2.4
--- chan_sip.c	21 Nov 2005 19:29:51 -0000	1.913.2.3
+++ chan_sip.c	21 Nov 2005 19:31:26 -0000	1.913.2.4
@@ -12100,8 +12100,11 @@
 				}
 				if (!strcasecmp(v->name, "outboundproxy"))
 					obproxyfound=1;
-				else
+				else {
 					ast_copy_string(peer->tohost, v->value, sizeof(peer->tohost));
+					if (!peer->addr.sin_port)
+						peer->addr.sin_port = htons(DEFAULT_SIP_PORT);
+				}
 			}
 		} else if (!strcasecmp(v->name, "defaultip")) {
 			if (ast_get_ip(&peer->defaddr, v->value)) {




More information about the svn-commits mailing list