From d04e866925984d526dab93be78c286a28dae67f8 Mon Sep 17 00:00:00 2001 From: David Vossel Date: Thu, 19 Aug 2010 21:03:24 +0000 Subject: [PATCH] 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 --- channels/chan_sip.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.47.2