[asterisk-commits] dvossel: branch 1.8 r292155 - /branches/1.8/main/netsock2.c

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


Author: dvossel
Date: Mon Oct 18 14:16:00 2010
New Revision: 292155

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=292155
Log:
Fixes build error for systems not supporting IPV6_TCLASS.

Modified:
    branches/1.8/main/netsock2.c

Modified: branches/1.8/main/netsock2.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/netsock2.c?view=diff&rev=292155&r1=292154&r2=292155
==============================================================================
--- branches/1.8/main/netsock2.c (original)
+++ branches/1.8/main/netsock2.c Mon Oct 18 14:16:00 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