Commit e2d7318a authored by Max Kellermann's avatar Max Kellermann

input_curl: return 0 on error from read()

The read() method must not return a negative value. Make it return 0 on error, just like the file input stream. Also set the "error" attribute to -1.
parent a8e81326
......@@ -156,6 +156,7 @@ input_curl_multi_info_read(struct input_stream *is)
msg->data.result != CURLE_OK) {
g_warning("curl failed: %s\n",
curl_easy_strerror(msg->data.result));
is->error = -1;
c->eof = true;
return false;
}
......@@ -262,7 +263,7 @@ input_curl_read(struct input_stream *is, void *ptr, size_t size)
bret = input_curl_multi_info_read(is);
if (!bret)
return -1;
return 0;
c->eof = running_handles == 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment