X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=service%2Fresource-container%2Fexamples%2FHueSampleBundle%2Fsrc%2FHueConnector.cpp;h=297faa10fb0f3a9b1572720c1f88d1b0148d4e29;hb=refs%2Ftags%2Faccepted%2Ftizen%2Funified%2F20171010.063815;hp=de7121baca3444c559f0f9db5cd660ccf66d85ac;hpb=edcfc3d2329da7b914771c0dcff5f42c9b74fd93;p=platform%2Fupstream%2Fiotivity.git diff --git a/service/resource-container/examples/HueSampleBundle/src/HueConnector.cpp b/service/resource-container/examples/HueSampleBundle/src/HueConnector.cpp index de7121b..297faa1 100644 --- a/service/resource-container/examples/HueSampleBundle/src/HueConnector.cpp +++ b/service/resource-container/examples/HueSampleBundle/src/HueConnector.cpp @@ -68,8 +68,8 @@ void HueConnector::disconnect() std::string HueConnector::transmit(std::string target, std::string payload) { std::cout << "Transmitting to " << target << " " << payload << endl; - CURL *curl; - CURLcode res; + CURL *curl = NULL; + CURLcode res = CURLE_OK; struct curl_slist *headers = NULL; /* http headers to send with request */ /* set content type */ headers = curl_slist_append(headers, "Accept: application/json"); @@ -114,8 +114,8 @@ static int writer(char *data, size_t size, size_t nmemb, std::string *buffer_in) std::string HueConnector::read(std::string target) { std::cout << "Reading from to " << target << endl; - CURL *curl; - CURLcode res; + CURL *curl = NULL; + CURLcode res = CURLE_OK; struct curl_slist *headers = NULL; /* http headers to send with request */ /* set content type */ headers = curl_slist_append(headers, "Accept: application/json");