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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jun 28 08:04:18 CDT 2010


Author: simon.perreault
Date: Mon Jun 28 08:04:14 2010
New Revision: 272645

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=272645
Log:
Fixed ast_sockaddr cast and initialization issues.

Modified:
    team/group/v6-new/addons/chan_ooh323.c
    team/group/v6-new/channels/chan_iax2.c

Modified: team/group/v6-new/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/group/v6-new/addons/chan_ooh323.c?view=diff&rev=272645&r1=272644&r2=272645
==============================================================================
--- team/group/v6-new/addons/chan_ooh323.c (original)
+++ team/group/v6-new/addons/chan_ooh323.c Mon Jun 28 08:04:14 2010
@@ -482,6 +482,7 @@
 		return NULL;
 	}
 
+	ouraddr.sin_family = AF_INET;
 	ouraddr.sin_addr = ipAddr;
 	tmp = ast_sockaddr_from_sin(ouraddr);
 	if (!(pvt->rtp = ast_rtp_instance_new("asterisk", sched, &tmp, NULL))) {
@@ -3936,8 +3937,8 @@
 	them.sin_family = AF_INET;
 	them.sin_addr.s_addr = inet_addr(remoteIp); /* only works for IPv4 */
 	them.sin_port = htons(remotePort);
+	tmp = ast_sockaddr_from_sin(&them);
 	ast_rtp_instance_set_remote_address(p->rtp, &tmp);
-	ast_sockaddr_to_sin(&tmp, &them);
 
 	if (p->writeformat & AST_FORMAT_G726_AAL2) 
                 ast_rtp_codecs_payloads_set_rtpmap_type(ast_rtp_instance_get_codecs(p->rtp), p->rtp, 2,

Modified: team/group/v6-new/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/team/group/v6-new/channels/chan_iax2.c?view=diff&rev=272645&r1=272644&r2=272645
==============================================================================
--- team/group/v6-new/channels/chan_iax2.c (original)
+++ team/group/v6-new/channels/chan_iax2.c Mon Jun 28 08:04:14 2010
@@ -8319,6 +8319,7 @@
 	if (!(reg = ast_calloc(1, sizeof(*reg))))
 		return -1;
 
+	reg->addr.sin_family = AF_INET;
 	reg_addr_tmp = ast_sockaddr_from_sin(reg->addr);
 	if (ast_dnsmgr_lookup(hostname, &reg_addr_tmp, &reg->dnsmgr, srvlookup ? "_iax._udp" : NULL) < 0) {
 		ast_free(reg);




More information about the asterisk-commits mailing list