From: David Vossel Date: Thu, 19 Aug 2010 21:03:24 +0000 (+0000) Subject: tos_sip option was not being set correctly X-Git-Tag: 1.4.36-rc1~3^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d04e866925984d526dab93be78c286a28dae67f8;p=thirdparty%2Fasterisk.git tos_sip option was not being set correctly When tos_sip is used, the tos of the sip socket is only set correctly if the socket binding changes on a reload. If the binding stays the same but the TOS changes, the new tos value would not take into effect. This patch fixes that. (closes issue #17712) Reported by: nickb git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@282893 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 02ac5002d6..a7edd8a255 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -18916,6 +18916,8 @@ static int reload_config(enum channelreloadreason reason) ast_log(LOG_WARNING, "Unable to set SIP TOS to %s\n", ast_tos2str(global_tos_sip)); } } + } else if (setsockopt(sipsock, IPPROTO_IP, IP_TOS, &global_tos_sip, sizeof(global_tos_sip))) { + ast_log(LOG_WARNING, "Unable to set SIP TOS to %s\n", ast_tos2str(global_tos_sip)); } ast_mutex_unlock(&netlock);