From c7727da19f24a81041563bc8a195531adcf0f628 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sat, 1 Mar 2008 13:52:02 +0000 Subject: httpget class: if a request is cancelled before a response is available give a hint about this instead of returning a nonsense response value. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16463 a1c6a512-1295-4272-9138-f99709370657 --- rbutil/rbutilqt/httpget.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rbutil') diff --git a/rbutil/rbutilqt/httpget.cpp b/rbutil/rbutilqt/httpget.cpp index 0bf5d966eb..acd8940b77 100644 --- a/rbutil/rbutilqt/httpget.cpp +++ b/rbutil/rbutilqt/httpget.cpp @@ -32,6 +32,10 @@ HttpGet::HttpGet(QObject *parent) outputToBuffer = true; cached = false; getRequest = -1; + // if a request is cancelled before a reponse is available return some + // hint about this in the http response instead of nonsense. + response = -1; + connect(&http, SIGNAL(done(bool)), this, SLOT(httpDone(bool))); connect(&http, SIGNAL(dataReadProgress(int, int)), this, SLOT(httpProgress(int, int))); connect(&http, SIGNAL(requestFinished(int, bool)), this, SLOT(httpFinished(int, bool))); -- cgit v1.2.3