]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
lib-http: client: Fixed bug in handling of lost connections while returning from...
authorStephan Bosch <stephan@dovecot.fi>
Wed, 25 May 2016 21:41:47 +0000 (23:41 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 20 Jun 2016 00:25:14 +0000 (03:25 +0300)
commit8d558a5763725741c77682a4229014222252b4e0
tree00be905a29a8c14b1c775dc49b71be1e1b0151d0
parent07b6d2bd9b8af054416b90cd0b816233e18364e3
lib-http: client: Fixed bug in handling of lost connections while returning from another ioloop.

At one instance the http_client_connection_is_ready() function could have destroyed the connection while the caller still depended on it.
Renamed the http_client_connection_is_ready() function to http_client_connection_check_ready().
This now returns -1 when the connection got destroyed. Before it returned a bool that just indicated whether the connection was ready or not.
So, there is no need anymore to preserve a connection reference while calling this function.
src/lib-http/http-client-connection.c
src/lib-http/http-client-peer.c
src/lib-http/http-client-private.h