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:
Daniel Stenberg 2025-12-04 19:57:44 +01:00
parent ebe6fa08c9
commit a1531261b1
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -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) {