]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Check if TLS is really available
authorStefan Knoblich <stkn@freeswitch.org>
Fri, 18 Jan 2008 21:13:52 +0000 (21:13 +0000)
committerStefan Knoblich <stkn@freeswitch.org>
Fri, 18 Jan 2008 21:13:52 +0000 (21:13 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7286 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia_glue.c

index aee2cb04bf2ce39ba55c391ea6da8049bcfe97a6..43e1679e0fbf51bcdc25bc8dd24279aaf8d97cfb 100644 (file)
@@ -765,6 +765,11 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
                        }
                }
 
+               if (!sofia_test_pflag(tech_pvt->profile, PFLAG_TLS) && sofia_glue_transport_has_tls(tech_pvt->transport)) {
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "TLS not supported by profile\n");
+                       return SWITCH_STATUS_FALSE;
+               }
+
                if (switch_strlen_zero(tech_pvt->invite_contact))
                {
                        if (sofia_glue_transport_has_tls(tech_pvt->transport))