]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't crash when using realtime in chan_sip without an insecure setting in the database.
authorRussell Bryant <russell@russellbryant.com>
Wed, 22 Aug 2007 21:00:44 +0000 (21:00 +0000)
committerRussell Bryant <russell@russellbryant.com>
Wed, 22 Aug 2007 21:00:44 +0000 (21:00 +0000)
(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

channels/chan_sip.c

index 382a1f8f8ab75b875eb5bbc0bb8184db11d50c7e..5731d7ba1a2e5b5c53984a38cf6de24dcaf5d95c 100644 (file)
@@ -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) {