1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

curl: fix callback functions to match prototype

The function tool_debug_cb doesn't match curl_debug_callback in curl.h
(unsigned vs. signed char* for 3rd param).

Bug: https://curl.haxx.se/mail/lib-2017-03/0120.html
This commit is contained in:
Hanno Böck 2017-03-30 14:59:14 +02:00 committed by Daniel Stenberg
parent 244e0a36bd
commit baaf0ba358
2 changed files with 4 additions and 3 deletions

View File

@ -41,7 +41,7 @@ static void dump(const char *timebuf, const char *text,
*/ */
int tool_debug_cb(CURL *handle, curl_infotype type, int tool_debug_cb(CURL *handle, curl_infotype type,
unsigned char *data, size_t size, char *data, size_t size,
void *userdata) void *userdata)
{ {
struct OperationConfig *operation = userdata; struct OperationConfig *operation = userdata;
@ -209,7 +209,8 @@ int tool_debug_cb(CURL *handle, curl_infotype type,
break; break;
} }
dump(timebuf, text, output, data, size, config->tracetype, type); dump(timebuf, text, output, (unsigned char *) data, size, config->tracetype,
type);
return 0; return 0;
} }

View File

@ -28,7 +28,7 @@
*/ */
int tool_debug_cb(CURL *handle, curl_infotype type, int tool_debug_cb(CURL *handle, curl_infotype type,
unsigned char *data, size_t size, char *data, size_t size,
void *userdata); void *userdata);
#endif /* HEADER_CURL_TOOL_CB_DBG_H */ #endif /* HEADER_CURL_TOOL_CB_DBG_H */