Displaying 2 results from an estimated 2 matches for "rcvdata".
Did you mean:
recvdata
2020 Jan 22
1
Memory error in the libcurl connection code
...actually works.
It seems that the fix is simply this:
------------------------------------
--- src/modules/internet/libcurl.c~
+++ src/modules/internet/libcurl.c
@@ -762,6 +762,7 @@
void *newbuf = realloc(ctxt->buf, newbufsize);
if (!newbuf) error("Failure in re-allocation in rcvData");
ctxt->buf = newbuf; ctxt->bufsize = newbufsize;
+ ctxt->current = ctxt->buf;
}
memcpy(ctxt->buf + ctxt->filled, ptr, add);
------------------------------------
Best,
Gabor
2018 Dec 04
3
patch to support custom HTTP headers in download.file() and url()
...{
if (n_err == nurls) error(_("cannot download any files"));
@@ -703,6 +721,7 @@ typedef struct Curlconn {
Rboolean available; // to be read out
int sr; // 'still running' count
CURLM *mh; CURL *hnd;
+ struct curl_slist *headers;
} *RCurlconn;
static size_t rcvData(void *ptr, size_t size, size_t nitems, void *ctx)
@@ -771,6 +790,7 @@ static void Curl_close(Rconnection con)
{
RCurlconn ctxt = (RCurlconn)(con->private);
+ curl_slist_free_all(ctxt->headers);
curl_multi_remove_handle(ctxt->mh, ctxt->hnd);
curl_easy_cleanup(ctxt->...