mirror of
https://github.com/curl/curl.git
synced 2026-07-24 11:17:22 +03:00
CURLMOPT_SOCKETFUNCTION.md: fix the callback argument use
The example code does not use curl_multi_assign(), but its callback function used socketp (called sockp in the function) to get the struct priv pointer instead of the correct clientp (cbp). Reported-by: Greg Hudson Fixes #19840 Closes #19841
This commit is contained in:
parent
ebe6fa08c9
commit
a1531261b1
1 changed files with 1 additions and 1 deletions
|
|
@ -109,7 +109,7 @@ struct priv {
|
|||
|
||||
static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
|
||||
{
|
||||
struct priv *p = sockp;
|
||||
struct priv *p = cbp;
|
||||
printf("our ptr: %p\n", p->ours);
|
||||
|
||||
if(what == CURL_POLL_REMOVE) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue