[Asterisk-cvs] asterisk/channels chan_iax2.c, 1.382, 1.383 chan_sip.c, 1.916, 1.917

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


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

Modified Files:
	chan_iax2.c chan_sip.c 
Log Message:
fix port number handling in peer building functions


Index: chan_iax2.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_iax2.c,v
retrieving revision 1.382
retrieving revision 1.383
diff -u -d -r1.382 -r1.383
--- chan_iax2.c	21 Nov 2005 19:20:26 -0000	1.382
+++ chan_iax2.c	21 Nov 2005 19:27:26 -0000	1.383
@@ -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.916
retrieving revision 1.917
diff -u -d -r1.916 -r1.917
--- chan_sip.c	21 Nov 2005 19:20:26 -0000	1.916
+++ chan_sip.c	21 Nov 2005 19:27:26 -0000	1.917
@@ -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