Changeset - r26878:b9c8507af623
[Not reviewed]
master
0 1 0
frosch - 16 months ago 2023-02-13 19:09:49
frosch@openttd.org
Fix: compilation with libcurl from 2013.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/network/core/http_curl.cpp
Show inline comments
 
@@ -122,25 +122,25 @@ void NetworkHTTPRequest::Connect()
 
 *
 
 * @return True iff the request is done; no call to Receive() should be done after it returns true.
 
 */
 
bool NetworkHTTPRequest::Receive()
 
{
 
	int still_running = 0;
 

	
 
	/* Check for as long as there is activity on the socket, but once in a while return.
 
	 * This allows the GUI to always update, even on really fast downloads. */
 
	for (int count = 0; count < 100; count++) {
 
		/* Check if there was activity in the multi-handle. */
 
		int numfds;
 
		curl_multi_poll(this->multi_handle, NULL, 0, 0, &numfds);
 
		curl_multi_wait(this->multi_handle, NULL, 0, 0, &numfds);
 
		if (numfds == 0) return false;
 

	
 
		/* Let CURL process the activity. */
 
		curl_multi_perform(this->multi_handle, &still_running);
 
		if (still_running == 0) break;
 
	}
 

	
 
	/* The download is still pending (so the count is reached). Update GUI. */
 
	if (still_running != 0) return false;
 

	
 
	/* The request is done; check the result and close up. */
 
	int msgq;
0 comments (0 inline, 0 general)