[asterisk-commits] simon.perreault: branch group/v6-new r272527 - in /team/group/v6-new/channels...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jun 25 12:53:56 CDT 2010


Author: simon.perreault
Date: Fri Jun 25 12:53:52 2010
New Revision: 272527

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=272527
Log:
Fixed wrong port in outboundproxy.

Modified:
    team/group/v6-new/channels/chan_sip.c
    team/group/v6-new/channels/sip/include/sip.h

Modified: team/group/v6-new/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/v6-new/channels/chan_sip.c?view=diff&rev=272527&r1=272526&r2=272527
==============================================================================
--- team/group/v6-new/channels/chan_sip.c (original)
+++ team/group/v6-new/channels/chan_sip.c Fri Jun 25 12:53:52 2010
@@ -2864,8 +2864,7 @@
 
 	}
 
-	if(!ast_sockaddr_port(&proxy->ip))
-		ast_sockaddr_set_port(&proxy->ip, STANDARD_SIP_PORT);
+	ast_sockaddr_set_port(&proxy->ip, proxy->port);
 
 	proxy->last_dnsupdate = time(NULL);
 	return TRUE;
@@ -26211,7 +26210,6 @@
 				default_fromdomainport = STANDARD_SIP_PORT;
 			}
 		} else if (!strcasecmp(v->name, "outboundproxy")) {
-			int portnum;
 			char *tok, *proxyname;
 
 			if (ast_strlen_zero(v->value)) {
@@ -26221,9 +26219,9 @@
 
 			tok = ast_skip_blanks(strtok(ast_strdupa(v->value), ","));
 
-			sip_parse_host(tok, v->lineno, &proxyname, &portnum, &sip_cfg.outboundproxy.transport);
-
-			ast_sockaddr_set_port(&sip_cfg.outboundproxy.ip, portnum);
+			sip_parse_host(tok, v->lineno, &proxyname,
+				       &sip_cfg.outboundproxy.port,
+				       &sip_cfg.outboundproxy.transport);
 
 			if ((tok = strtok(NULL, ","))) {
 				sip_cfg.outboundproxy.force = !strncasecmp(ast_skip_blanks(tok), "force", 5);

Modified: team/group/v6-new/channels/sip/include/sip.h
URL: http://svnview.digium.com/svn/asterisk/team/group/v6-new/channels/sip/include/sip.h?view=diff&rev=272527&r1=272526&r2=272527
==============================================================================
--- team/group/v6-new/channels/sip/include/sip.h (original)
+++ team/group/v6-new/channels/sip/include/sip.h Fri Jun 25 12:53:52 2010
@@ -638,6 +638,7 @@
 struct sip_proxy {
 	char name[MAXHOSTNAMELEN];      /*!< DNS name of domain/host or IP */
 	struct ast_sockaddr ip;          /*!< Currently used IP address and port */
+	int port;
 	time_t last_dnsupdate;          /*!< When this was resolved */
 	enum sip_transport transport;
 	int force;                      /*!< If it's an outbound proxy, Force use of this outbound proxy for all outbound requests */




More information about the asterisk-commits mailing list