Be sure to set the Result /= 0 (i.e ECURLE_OK) when error occurred.
git-svn-id: https://svn.origo.ethz.ch/eiffelstudio/trunk/Src/library/cURL@87340 8089f293-4706-0410-a29e-feb5c42a2edf
This commit is contained in:
@@ -11,6 +11,11 @@ note
|
||||
class
|
||||
CURL_CODES
|
||||
|
||||
feature -- Eiffel cURL: Constants
|
||||
|
||||
eiffelcurle_error_occurred: INTEGER = -1
|
||||
-- Error occurred in Eiffel cURL internals
|
||||
|
||||
feature -- Constants
|
||||
|
||||
curle_ok: INTEGER = 0
|
||||
|
||||
@@ -116,9 +116,9 @@ feature -- Command
|
||||
l_api := api_loader.api_pointer ("curl_easy_perform")
|
||||
if l_api /= default_pointer then
|
||||
Result := c_perform (l_api, a_curl_handle)
|
||||
else
|
||||
Result := {CURL_CODES}.eiffelcurle_error_occurred
|
||||
end
|
||||
ensure
|
||||
valid:
|
||||
end
|
||||
|
||||
cleanup (a_curl_handle: POINTER)
|
||||
|
||||
Reference in New Issue
Block a user