From: Russell Bryant Date: Wed, 22 Aug 2007 21:00:44 +0000 (+0000) Subject: Don't crash when using realtime in chan_sip without an insecure setting in the database. X-Git-Tag: 1.4.12~207 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c5cf1e50acea9a9806d5dac7825a9eefb9724dc8;p=thirdparty%2Fasterisk.git Don't crash when using realtime in chan_sip without an insecure setting in the database. (closes issue #10348, reported by link55, fixed by me) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80390 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 382a1f8f8a..5731d7ba1a 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -15713,6 +15713,10 @@ static void set_insecure_flags(struct ast_flags *flags, const char *value, int l { static int dep_insecure_very = 0; static int dep_insecure_yes = 0; + + if (ast_strlen_zero(value)) + return; + if (!strcasecmp(value, "very")) { ast_set_flag(flags, SIP_INSECURE_PORT | SIP_INSECURE_INVITE); if(!dep_insecure_very) {