|
|
|
@ -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)
|
|
|
|
|