dovecot-2.2: lib-http: client: Fixed assert crash occurring when...

dovecot at dovecot.org dovecot at dovecot.org
Thu Oct 9 21:47:02 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/6c341dcec32a
changeset: 17935:6c341dcec32a
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Fri Oct 10 00:46:15 2014 +0300
description:
lib-http: client: Fixed assert crash occurring when DNS lookup fails immediately during request submission.
In that situation, the request was not dropped from the queue immediately, triggering the assert crash.

diffstat:

 src/lib-http/http-client-request.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r 86b1860c8deb -r 6c341dcec32a src/lib-http/http-client-request.c
--- a/src/lib-http/http-client-request.c	Thu Oct 09 21:23:08 2014 +0300
+++ b/src/lib-http/http-client-request.c	Fri Oct 10 00:46:15 2014 +0300
@@ -900,6 +900,9 @@
 	if (req->state >= HTTP_REQUEST_STATE_FINISHED)
 		return;
 
+	if (req->queue != NULL)
+		http_client_queue_drop_request(req->queue, req);
+
 	if (!req->submitted) {
 		/* we're still in http_client_request_submit(). delay
 		   reporting the error, so the caller doesn't have to handle
@@ -910,8 +913,6 @@
 		http_client_host_delay_request_error(req->host, req);
 	} else {
 		http_client_request_send_error(req, status, error);
-		if (req->queue != NULL)
-			http_client_queue_drop_request(req->queue, req);
 		http_client_request_unref(&req);
 	}
 }


More information about the dovecot-cvs mailing list