提交 18a93b2f authored 作者: Anthony Minessale's avatar Anthony Minessale

enable https on mod_xml_cdr

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9321 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 35124f32
...@@ -141,6 +141,11 @@ static switch_status_t my_on_hangup(switch_core_session_t *session) ...@@ -141,6 +141,11 @@ static switch_status_t my_on_hangup(switch_core_session_t *session)
headers = curl_slist_append(headers, "Content-Type: application/x-www-form-plaintext"); headers = curl_slist_append(headers, "Content-Type: application/x-www-form-plaintext");
} }
if (!strncasecmp(globals.url, "https", 5)) {
curl_easy_setopt(curl_handle, CURLOPT_SSL_VERIFYPEER, 0);
curl_easy_setopt(curl_handle, CURLOPT_SSL_VERIFYHOST, 0);
}
if (!(curl_xml_text = switch_mprintf("cdr=%s", xml_text))) { if (!(curl_xml_text = switch_mprintf("cdr=%s", xml_text))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n");
goto error; goto error;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论