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;
}
}
+#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)))) {
}
}
}
+#endif
#ifdef linux
if (setsockopt(sockfd, SOL_SOCKET, SO_PRIORITY, &cos, sizeof(cos))) {