mirror of https://github.com/axmolengine/axmol.git
closed #2450: Fixing HttpClientTest crashes on 64bit system.
This commit is contained in:
parent
43e98be8b7
commit
1896305fcb
|
@ -86,10 +86,10 @@ static size_t writeHeaderData(void *ptr, size_t size, size_t nmemb, void *stream
|
|||
}
|
||||
|
||||
|
||||
static int processGetTask(HttpRequest *request, write_callback callback, void *stream, int32_t *errorCode, write_callback headerCallback, void *headerStream);
|
||||
static int processPostTask(HttpRequest *request, write_callback callback, void *stream, int32_t *errorCode, write_callback headerCallback, void *headerStream);
|
||||
static int processPutTask(HttpRequest *request, write_callback callback, void *stream, int32_t *errorCode, write_callback headerCallback, void *headerStream);
|
||||
static int processDeleteTask(HttpRequest *request, write_callback callback, void *stream, int32_t *errorCode, write_callback headerCallback, void *headerStream);
|
||||
static int processGetTask(HttpRequest *request, write_callback callback, void *stream, long *errorCode, write_callback headerCallback, void *headerStream);
|
||||
static int processPostTask(HttpRequest *request, write_callback callback, void *stream, long *errorCode, write_callback headerCallback, void *headerStream);
|
||||
static int processPutTask(HttpRequest *request, write_callback callback, void *stream, long *errorCode, write_callback headerCallback, void *headerStream);
|
||||
static int processDeleteTask(HttpRequest *request, write_callback callback, void *stream, long *errorCode, write_callback headerCallback, void *headerStream);
|
||||
// int processDownloadTask(HttpRequest *task, write_callback callback, void *stream, int32_t *errorCode);
|
||||
|
||||
|
||||
|
@ -137,7 +137,7 @@ static void networkThread(void)
|
|||
request->release();
|
||||
// ok, refcount = 1 now, only HttpResponse hold it.
|
||||
|
||||
int32_t responseCode = -1;
|
||||
long responseCode = -1;
|
||||
int retValue = 0;
|
||||
|
||||
// Process the request -> get response packet
|
||||
|
@ -320,7 +320,7 @@ public:
|
|||
}
|
||||
|
||||
/// @param responseCode Null not allowed
|
||||
bool perform(int *responseCode)
|
||||
bool perform(long *responseCode)
|
||||
{
|
||||
if (CURLE_OK != curl_easy_perform(_curl))
|
||||
return false;
|
||||
|
@ -336,7 +336,7 @@ public:
|
|||
};
|
||||
|
||||
//Process Get Request
|
||||
static int processGetTask(HttpRequest *request, write_callback callback, void *stream, int32_t *responseCode, write_callback headerCallback, void *headerStream)
|
||||
static int processGetTask(HttpRequest *request, write_callback callback, void *stream, long *responseCode, write_callback headerCallback, void *headerStream)
|
||||
{
|
||||
CURLRaii curl;
|
||||
bool ok = curl.init(request, callback, stream, headerCallback, headerStream)
|
||||
|
@ -346,7 +346,7 @@ static int processGetTask(HttpRequest *request, write_callback callback, void *s
|
|||
}
|
||||
|
||||
//Process POST Request
|
||||
static int processPostTask(HttpRequest *request, write_callback callback, void *stream, int32_t *responseCode, write_callback headerCallback, void *headerStream)
|
||||
static int processPostTask(HttpRequest *request, write_callback callback, void *stream, long *responseCode, write_callback headerCallback, void *headerStream)
|
||||
{
|
||||
CURLRaii curl;
|
||||
bool ok = curl.init(request, callback, stream, headerCallback, headerStream)
|
||||
|
@ -358,7 +358,7 @@ static int processPostTask(HttpRequest *request, write_callback callback, void *
|
|||
}
|
||||
|
||||
//Process PUT Request
|
||||
static int processPutTask(HttpRequest *request, write_callback callback, void *stream, int32_t *responseCode, write_callback headerCallback, void *headerStream)
|
||||
static int processPutTask(HttpRequest *request, write_callback callback, void *stream, long *responseCode, write_callback headerCallback, void *headerStream)
|
||||
{
|
||||
CURLRaii curl;
|
||||
bool ok = curl.init(request, callback, stream, headerCallback, headerStream)
|
||||
|
@ -370,7 +370,7 @@ static int processPutTask(HttpRequest *request, write_callback callback, void *s
|
|||
}
|
||||
|
||||
//Process DELETE Request
|
||||
static int processDeleteTask(HttpRequest *request, write_callback callback, void *stream, int32_t *responseCode, write_callback headerCallback, void *headerStream)
|
||||
static int processDeleteTask(HttpRequest *request, write_callback callback, void *stream, long *responseCode, write_callback headerCallback, void *headerStream)
|
||||
{
|
||||
CURLRaii curl;
|
||||
bool ok = curl.init(request, callback, stream, headerCallback, headerStream)
|
||||
|
|
Loading…
Reference in New Issue