From 119f43360b60c903982104944145d9cd8b7ec054 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sun, 25 Sep 2011 18:53:29 +0200 Subject: allow write callbacks to indicate OOM to libcurl Allow (*curl_write_callback) write callbacks to return CURL_WRITEFUNC_OUT_OF_MEMORY to properly indicate libcurl of OOM conditions inside the callback itself. --- docs/libcurl/curl_easy_setopt.3 | 5 +++++ docs/libcurl/symbols-in-versions | 1 + 2 files changed, 6 insertions(+) (limited to 'docs') diff --git a/docs/libcurl/curl_easy_setopt.3 b/docs/libcurl/curl_easy_setopt.3 index 9f6f11d89..b9d42b54e 100644 --- a/docs/libcurl/curl_easy_setopt.3 +++ b/docs/libcurl/curl_easy_setopt.3 @@ -160,6 +160,11 @@ From 7.18.0, the function can return CURL_WRITEFUNC_PAUSE which then will cause writing to this connection to become paused. See \fIcurl_easy_pause(3)\fP for further details. +From 7.22.1, the function can return CURL_WRITEFUNC_OUT_OF_MEMORY to indicate +libcurl that an attempt to dynamically allocate memory from within the write +callback itself has failed. This will abort the transfer and make libcurl +return CURLE_OUT_OF_MEMORY. + This function may be called with zero bytes data if the transferred file is empty. diff --git a/docs/libcurl/symbols-in-versions b/docs/libcurl/symbols-in-versions index 028bb1a57..5c985bde7 100644 --- a/docs/libcurl/symbols-in-versions +++ b/docs/libcurl/symbols-in-versions @@ -685,4 +685,5 @@ CURL_VERSION_SPNEGO 7.10.8 CURL_VERSION_SSL 7.10 CURL_VERSION_SSPI 7.13.2 CURL_VERSION_TLSAUTH_SRP 7.21.4 +CURL_WRITEFUNC_OUT_OF_MEMORY 7.22.1 CURL_WRITEFUNC_PAUSE 7.18.0 -- cgit v1.2.3