Set length on cURL write

This commit is contained in:
Joshua Granick
2019-02-06 11:38:50 -08:00
parent f37ba6f3d2
commit 864dcf74cc
2 changed files with 8 additions and 4 deletions

View File

@@ -611,7 +611,7 @@ namespace lime {
value _bytes = bytes->Value ((value)bytesRoot->Get ());
curl_gc_mutex.Unlock ();
length = val_int ((value)writeCallback->Call (_bytes));
length = val_int ((value)writeCallback->Call (_bytes, alloc_int (position)));
curl_gc_mutex.Lock ();
if (length == CURL_WRITEFUNC_PAUSE) {
@@ -715,7 +715,7 @@ namespace lime {
writeBufferPosition[easy_handle] = 0;
curl_gc_mutex.Unlock ();
length = *((int*)writeCallback->Call (bytes));
length = *((int*)writeCallback->Call (bytes, &position));
curl_gc_mutex.Lock ();
if (length == CURL_WRITEFUNC_PAUSE) {