mirror of
https://github.com/curl/curl.git
synced 2026-04-15 02:21:41 +03:00
CURLOPT_XFERINFOFUNCTION.md: fix the callback return type in example
Fixes #17228 Reported-by: gkarracer on github Closes #17229
This commit is contained in:
parent
3fcddc835c
commit
d33b449271
1 changed files with 6 additions and 6 deletions
|
|
@ -85,11 +85,11 @@ struct progress {
|
|||
size_t size;
|
||||
};
|
||||
|
||||
static size_t progress_callback(void *clientp,
|
||||
curl_off_t dltotal,
|
||||
curl_off_t dlnow,
|
||||
curl_off_t ultotal,
|
||||
curl_off_t ulnow)
|
||||
static int xferinfo_callback(void *clientp,
|
||||
curl_off_t dltotal,
|
||||
curl_off_t dlnow,
|
||||
curl_off_t ultotal,
|
||||
curl_off_t ulnow)
|
||||
{
|
||||
struct progress *memory = clientp;
|
||||
printf("my ptr: %p\n", memory->private);
|
||||
|
|
@ -111,7 +111,7 @@ int main(void)
|
|||
/* enable progress callback getting called */
|
||||
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, progress_callback);
|
||||
curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, xferinfo_callback);
|
||||
}
|
||||
}
|
||||
~~~
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue