[libgdata] core: Don't duplicate the received chunks in GDataDownloadStream



commit 79995b6789c89dc9bbe8514428045e8a151c78f6
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Oct 2 16:00:06 2015 +0200

    core: Don't duplicate the received chunks in GDataDownloadStream
    
    We were accumulating SoupMessage::got-chunk connections whenever the
    network thread was restarted. This meant that we were pushing the same
    chunks of data multiple times into the GDataBuffer.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=755976

 gdata/gdata-download-stream.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gdata/gdata-download-stream.c b/gdata/gdata-download-stream.c
index cddf892..b43d67d 100644
--- a/gdata/gdata-download-stream.c
+++ b/gdata/gdata-download-stream.c
@@ -906,6 +906,8 @@ reset_network_thread (GDataDownloadStream *self)
 
        if (priv->message != NULL) {
                soup_session_cancel_message (priv->session, priv->message, SOUP_STATUS_CANCELLED);
+               g_signal_handlers_disconnect_by_func (priv->message, got_headers_cb, self);
+               g_signal_handlers_disconnect_by_func (priv->message, got_chunk_cb, self);
        }
 
        priv->offset = 0;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]