Fix no response in case kore was built with NOTLS=1. (#142)

This commit is contained in:
john721 2016-08-16 16:19:07 +08:00 committed by Joris Vink
parent 7d1d5329c9
commit f15558ed98
1 changed files with 4 additions and 0 deletions

View File

@ -203,7 +203,11 @@ run_curl(struct kore_task *t)
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, fields);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_write_cb);
#if !defined(KORE_NO_TLS)
curl_easy_setopt(curl, CURLOPT_URL, "https://127.0.0.1:8888/post_back");
#else
curl_easy_setopt(curl, CURLOPT_URL, "http://127.0.0.1:8888/post_back");
#endif
res = curl_easy_perform(curl);
if (res != CURLE_OK) {