From f15558ed98aa1e91a611642529130b6f10150c4c Mon Sep 17 00:00:00 2001 From: john721 Date: Tue, 16 Aug 2016 16:19:07 +0800 Subject: [PATCH] Fix no response in case kore was built with NOTLS=1. (#142) --- examples/tasks/src/tasks.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/tasks/src/tasks.c b/examples/tasks/src/tasks.c index 9b9dea7..167a264 100644 --- a/examples/tasks/src/tasks.c +++ b/examples/tasks/src/tasks.c @@ -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) {