Skip to content

Commit

Permalink
curl: fix callback functions to match prototype
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hannob authored and bagder committed Mar 30, 2017
1 parent 244e0a3 commit baaf0ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/tool_cb_dbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static void dump(const char *timebuf, const char *text,
*/

int tool_debug_cb(CURL *handle, curl_infotype type,
unsigned char *data, size_t size,
char *data, size_t size,
void *userdata)
{
struct OperationConfig *operation = userdata;
Expand Down Expand Up @@ -209,7 +209,8 @@ int tool_debug_cb(CURL *handle, curl_infotype type,
break;
}

dump(timebuf, text, output, data, size, config->tracetype, type);
dump(timebuf, text, output, (unsigned char *) data, size, config->tracetype,
type);
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion src/tool_cb_dbg.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*/

int tool_debug_cb(CURL *handle, curl_infotype type,
unsigned char *data, size_t size,
char *data, size_t size,
void *userdata);

#endif /* HEADER_CURL_TOOL_CB_DBG_H */
Expand Down

0 comments on commit baaf0ba

Please sign in to comment.