Bump liberty
This commit is contained in:
		
							
								
								
									
										2
									
								
								liberty
									
									
									
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								liberty
									
									
									
									
									
								
							 Submodule liberty updated: 0b77bdeaf9...dc54db9069
									
								
							
							
								
								
									
										30
									
								
								nncmpp.c
									
									
									
									
									
								
							
							
						
						
									
										30
									
								
								nncmpp.c
									
									
									
									
									
								
							@@ -264,10 +264,7 @@ poller_curl_init (struct poller_curl *self, struct poller *poller,
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	memset (self, 0, sizeof *self);
 | 
						memset (self, 0, sizeof *self);
 | 
				
			||||||
	if (!(self->multi = curl_multi_init ()))
 | 
						if (!(self->multi = curl_multi_init ()))
 | 
				
			||||||
	{
 | 
							return error_set (e, "cURL setup failed");
 | 
				
			||||||
		error_set (e, "cURL setup failed");
 | 
					 | 
				
			||||||
		return false;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	CURLMcode mres;
 | 
						CURLMcode mres;
 | 
				
			||||||
	if ((mres = curl_multi_setopt (self->multi,
 | 
						if ((mres = curl_multi_setopt (self->multi,
 | 
				
			||||||
@@ -277,10 +274,9 @@ poller_curl_init (struct poller_curl *self, struct poller *poller,
 | 
				
			|||||||
	 || (mres = curl_multi_setopt (self->multi, CURLMOPT_SOCKETDATA, self))
 | 
						 || (mres = curl_multi_setopt (self->multi, CURLMOPT_SOCKETDATA, self))
 | 
				
			||||||
	 || (mres = curl_multi_setopt (self->multi, CURLMOPT_TIMERDATA, self)))
 | 
						 || (mres = curl_multi_setopt (self->multi, CURLMOPT_TIMERDATA, self)))
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		error_set (e, "%s: %s",
 | 
					 | 
				
			||||||
			"cURL setup failed", curl_multi_strerror (mres));
 | 
					 | 
				
			||||||
		curl_multi_cleanup (self->multi);
 | 
							curl_multi_cleanup (self->multi);
 | 
				
			||||||
		return false;
 | 
							return error_set (e, "%s: %s",
 | 
				
			||||||
 | 
								"cURL setup failed", curl_multi_strerror (mres));
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	poller_timer_init (&self->timer, (self->poller = poller));
 | 
						poller_timer_init (&self->timer, (self->poller = poller));
 | 
				
			||||||
@@ -310,10 +306,7 @@ poller_curl_spawn (struct poller_curl_task *task, struct error **e)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	CURL *easy;
 | 
						CURL *easy;
 | 
				
			||||||
	if (!(easy = curl_easy_init ()))
 | 
						if (!(easy = curl_easy_init ()))
 | 
				
			||||||
	{
 | 
							return error_set (e, "cURL setup failed");
 | 
				
			||||||
		error_set (e, "cURL setup failed");
 | 
					 | 
				
			||||||
		return false;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// We already take care of SIGPIPE, and native DNS timeouts are only
 | 
						// We already take care of SIGPIPE, and native DNS timeouts are only
 | 
				
			||||||
	// a problem for people without the AsynchDNS feature.
 | 
						// a problem for people without the AsynchDNS feature.
 | 
				
			||||||
@@ -327,9 +320,8 @@ poller_curl_spawn (struct poller_curl_task *task, struct error **e)
 | 
				
			|||||||
	 || (res = curl_easy_setopt (easy, CURLOPT_ERRORBUFFER, task->curl_error))
 | 
						 || (res = curl_easy_setopt (easy, CURLOPT_ERRORBUFFER, task->curl_error))
 | 
				
			||||||
	 || (res = curl_easy_setopt (easy, CURLOPT_PRIVATE,     task)))
 | 
						 || (res = curl_easy_setopt (easy, CURLOPT_PRIVATE,     task)))
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		error_set (e, "%s", curl_easy_strerror (res));
 | 
					 | 
				
			||||||
		curl_easy_cleanup (easy);
 | 
							curl_easy_cleanup (easy);
 | 
				
			||||||
		return false;
 | 
							return error_set (e, "%s", curl_easy_strerror (res));
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	task->easy = easy;
 | 
						task->easy = easy;
 | 
				
			||||||
@@ -341,22 +333,18 @@ poller_curl_add (struct poller_curl *self, CURL *easy, struct error **e)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	CURLMcode mres;
 | 
						CURLMcode mres;
 | 
				
			||||||
	// "CURLMOPT_TIMERFUNCTION [...] will be called from within this function"
 | 
						// "CURLMOPT_TIMERFUNCTION [...] will be called from within this function"
 | 
				
			||||||
	if (!(mres = curl_multi_add_handle (self->multi, easy)))
 | 
						if ((mres = curl_multi_add_handle (self->multi, easy)))
 | 
				
			||||||
 | 
							return error_set (e, "%s", curl_multi_strerror (mres));
 | 
				
			||||||
	return true;
 | 
						return true;
 | 
				
			||||||
 | 
					 | 
				
			||||||
	error_set (e, "%s", curl_multi_strerror (mres));
 | 
					 | 
				
			||||||
	return false;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static bool
 | 
					static bool
 | 
				
			||||||
poller_curl_remove (struct poller_curl *self, CURL *easy, struct error **e)
 | 
					poller_curl_remove (struct poller_curl *self, CURL *easy, struct error **e)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	CURLMcode mres;
 | 
						CURLMcode mres;
 | 
				
			||||||
	if (!(mres = curl_multi_remove_handle (self->multi, easy)))
 | 
						if ((mres = curl_multi_remove_handle (self->multi, easy)))
 | 
				
			||||||
 | 
							return error_set (e, "%s", curl_multi_strerror (mres));
 | 
				
			||||||
	return true;
 | 
						return true;
 | 
				
			||||||
 | 
					 | 
				
			||||||
	error_set (e, "%s", curl_multi_strerror (mres));
 | 
					 | 
				
			||||||
	return false;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// --- Application -------------------------------------------------------------
 | 
					// --- Application -------------------------------------------------------------
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user