diff --git a/app/src/main/cpp/netcamera/httpclient.cpp b/app/src/main/cpp/netcamera/httpclient.cpp index 6f4e4ac4..a7e73ad4 100644 --- a/app/src/main/cpp/netcamera/httpclient.cpp +++ b/app/src/main/cpp/netcamera/httpclient.cpp @@ -21,6 +21,7 @@ static size_t OnWriteData(void* buffer, size_t size, size_t nmemb, void* lpVoid) static int SockOptCallback(void *clientp, curl_socket_t curlfd, curlsocktype purpose) { + net_handle_t netHandle = *((net_handle_t *)clientp); int res = android_setsocknetwork(netHandle, curlfd); @@ -63,8 +64,10 @@ int DoGetRequest(const char* url, int authType, const char* userName, const char if (netHandle != NETWORK_UNSPECIFIED) { +#if 0 curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, SockOptCallback); curl_easy_setopt(curl, CURLOPT_SOCKOPTDATA, &netHandle); +#endif } curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1); @@ -148,8 +151,10 @@ int DoPutRequest(const char* url, int authType, const char* userName, const char if (netHandle != NETWORK_UNSPECIFIED) { +#if 0 curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, SockOptCallback); curl_easy_setopt(curl, CURLOPT_SOCKOPTDATA, &netHandle); +#endif } if(contents != NULL)