[asterisk-commits] dvossel: trunk r292156 - in /trunk: ./ main/netsock2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 18 14:16:50 CDT 2010


Author: dvossel
Date: Mon Oct 18 14:16:48 2010
New Revision: 292156

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=292156
Log:
Merged revisions 292155 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r292155 | dvossel | 2010-10-18 14:16:00 -0500 (Mon, 18 Oct 2010) | 2 lines
  
  Fixes build error for systems not supporting IPV6_TCLASS.
........

Modified:
    trunk/   (props changed)
    trunk/main/netsock2.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: trunk/main/netsock2.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/netsock2.c?view=diff&rev=292156&r1=292155&r2=292156
==============================================================================
--- trunk/main/netsock2.c (original)
+++ trunk/main/netsock2.c Mon Oct 18 14:16:48 2010
@@ -453,7 +453,7 @@
 
 int ast_set_qos(int sockfd, int tos, int cos, const char *desc)
 {
-	int res;
+	int res = 0;
 	int set_tos;
 	int set_tclass;
 	struct ast_sockaddr addr;
@@ -473,6 +473,7 @@
 		}
 	}
 
+#if defined(IPV6_TCLASS) && defined(IPPROTO_IPV6)
 	if (set_tclass) {
 		if (!ast_getsockname(sockfd, &addr) && ast_sockaddr_is_ipv6(&addr)) {
 			if ((res = setsockopt(sockfd, IPPROTO_IPV6, IPV6_TCLASS, &tos, sizeof(tos)))) {
@@ -483,6 +484,7 @@
 			}
 		}
 	}
+#endif
 
 #ifdef linux
 	if (setsockopt(sockfd, SOL_SOCKET, SO_PRIORITY, &cos, sizeof(cos))) {




More information about the asterisk-commits mailing list