switch_uuid_format(uuid_str, &uuid);
switch_snprintf(filename, sizeof(filename), "%s%s%s.tmp.xml", SWITCH_GLOBAL_dirs.temp_dir, SWITCH_PATH_SEPARATOR, uuid_str);
- curl_handle = switch_curl_easy_init();
- headers = switch_curl_slist_append(headers, "Content-Type: application/x-www-form-urlencoded");
-
- if (!strncasecmp(binding->url, "https", 5)) {
- switch_curl_easy_setopt(curl_handle, CURLOPT_SSL_VERIFYPEER, 0);
- switch_curl_easy_setopt(curl_handle, CURLOPT_SSL_VERIFYHOST, 0);
- }
memset(&config_data, 0, sizeof(config_data));
config_data.max_bytes = binding->curl_max_bytes;
if ((config_data.fd = open(filename, O_CREAT | O_RDWR | O_TRUNC, S_IRUSR | S_IWUSR)) > -1) {
+ curl_handle = switch_curl_easy_init();
+ headers = switch_curl_slist_append(headers, "Content-Type: application/x-www-form-urlencoded");
+
+ if (!strncasecmp(binding->url, "https", 5)) {
+ switch_curl_easy_setopt(curl_handle, CURLOPT_SSL_VERIFYPEER, 0);
+ switch_curl_easy_setopt(curl_handle, CURLOPT_SSL_VERIFYHOST, 0);
+ }
+
if (!zstr(binding->cred)) {
switch_curl_easy_setopt(curl_handle, CURLOPT_HTTPAUTH, binding->auth_scheme);
switch_curl_easy_setopt(curl_handle, CURLOPT_USERPWD, binding->cred);