Cancelling paused messages does not work?
- From: Henry Högelow <henry hoegelow com>
- To: libsoup-list gnome org
- Subject: Cancelling paused messages does not work?
- Date: Tue, 17 Feb 2015 07:46:51 +0100
Hi all,
today we found out that soup_session_cancel_message() of SoupMessages in 'paused' state does not reliably cancel the messages. The following patch actually fixes the problem. We hope the change does not introduce new problems due to side effects. What do you think?
diff --git a/libsoup/soup-session.c b/libsoup/soup-session.c
index f2bd34b..f86d96b 100644
--- a/libsoup/soup-session.c
+++ b/libsoup/soup-session.c
@@ -2372,7 +2372,9 @@ soup_session_real_cancel_message (SoupSession *session, SoupMessage *msg, guint
item = soup_message_queue_lookup (priv->queue, msg);
g_return_if_fail (item != NULL);
- item->paused = FALSE;
+ if(item->paused)
+ soup_session_unpause_message(session, msg);
+
soup_message_set_status (msg, status_code);
g_cancellable_cancel (item->cancellable);
Thanks a lot,
Henry Hoegelow, Raumfeld GmbH
--
Henry Högelow
Freier Software-Architekt
Telefon: (+49) 151 22 80 40 28
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]