From 6a5f7f418caafe55320d16fd69d1b8ba21e17032 Mon Sep 17 00:00:00 2001 From: Stefan Becker Date: Wed, 10 Jul 2013 17:39:45 +0300 Subject: [PATCH] http: update timeout queue when destroying connection IMHO this is what commit af872c542c62926c39be6f50391dddc5d360eac9 tried to fix. (cherry picked from commit a51aff1b160c5e9ca699c2c660d24047b8577468) --- src/core/sipe-http-transport.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/sipe-http-transport.c b/src/core/sipe-http-transport.c index d08d4979..04792a17 100644 --- a/src/core/sipe-http-transport.c +++ b/src/core/sipe-http-transport.c @@ -78,10 +78,11 @@ static gint timeout_compare(gconstpointer a, ((struct sipe_http_connection *) b)->timeout); } +static void sipe_http_transport_update_timeout_queue(struct sipe_http_connection *conn, + gboolean remove); static void sipe_http_transport_free(gpointer data) { struct sipe_http_connection *conn = data; - struct sipe_http *http = conn->public.sipe_private->http; SIPE_DEBUG_INFO("sipe_http_transport_free: destroying connection '%s'", conn->host_port); @@ -90,7 +91,7 @@ static void sipe_http_transport_free(gpointer data) sipe_backend_transport_disconnect(conn->connection); conn->connection = NULL; - g_queue_remove(http->timeouts, conn); + sipe_http_transport_update_timeout_queue(conn, TRUE); sipe_http_request_shutdown(SIPE_HTTP_CONNECTION_PUBLIC); -- 2.11.4.GIT