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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 5 09:35:34 CDT 2010


Author: simon.perreault
Date: Mon Jul  5 09:35:30 2010
New Revision: 273968

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=273968
Log:
Call ast_sockaddr_hash() from peer_iphash_cb()

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

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=273968&r1=273967&r2=273968
==============================================================================
--- team/group/v6-new/channels/chan_sip.c (original)
+++ team/group/v6-new/channels/chan_sip.c Mon Jul  5 09:35:30 2010
@@ -27494,16 +27494,7 @@
 		ast_log(LOG_ERROR, "Empty address\n");
 	}
 
-	switch(peer->addr.ss.ss_family) {
-	case AF_INET:
-		ret = ((struct sockaddr_in*)&peer->addr.ss)->sin_addr.s_addr;
-		break;
-	case AF_INET6:
-		ret = ((uint32_t *)&((struct sockaddr_in6*)&peer->addr.ss)->sin6_addr)[3];
-		break;
-	default:
-		ast_log(LOG_ERROR, "Unknown address type\n");
-	}
+	ret = ast_sockaddr_hash(&peer->addr);
 
 	if (ret < 0) {
 		ret = -ret;




More information about the asterisk-commits mailing list