MCPcopy Create free account
hub / github.com/BatchDrake/SigDigger / curl_save_data

Method curl_save_data

Tasks/TLEDownloaderTask.cpp:29–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27#endif
28
29size_t
30TLEDownloaderTask::curl_save_data(
31 void *ptr,
32 size_t size,
33 size_t nmemb,
34 TLEDownloaderTask *self)
35{
36 size_t chunksize = size * nmemb;
37
38 if (self->data.size() + chunksize > TLE_DOWNLOADER_MAX_MEMORY_SIZE)
39 chunksize = TLE_DOWNLOADER_MAX_MEMORY_SIZE - self->data.size();
40
41 if (chunksize > 0) {
42 const char *asStr = reinterpret_cast<const char *>(ptr);
43 self->data.append(asStr, chunksize);
44 }
45
46 return nmemb;
47}
48
49int
50TLEDownloaderTask::curl_progress(

Callers

nothing calls this directly

Calls 2

appendMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected