diff options
author | Alexander Tkachev | 2016-05-15 00:31:02 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:07:55 +0600 |
commit | 8b585d631b21441dfa3de69d2c7c848d172c73be (patch) | |
tree | 36302c2945116c0229d0d897ae515bb4ac61c1f8 /backends/cloud/storage.cpp | |
parent | 6ad983bb7220eed2f635163a7fcfdac811b80ca0 (diff) | |
download | scummvm-rg350-8b585d631b21441dfa3de69d2c7c848d172c73be.tar.gz scummvm-rg350-8b585d631b21441dfa3de69d2c7c848d172c73be.tar.bz2 scummvm-rg350-8b585d631b21441dfa3de69d2c7c848d172c73be.zip |
CLOUD: Add CurlRequest
CurlRequest uses own multi_handle, in which it creates an easy_handle to
make a request.
Every time `handle()` is called it checks whether request is complete
and, if it is, stops.
Diffstat (limited to 'backends/cloud/storage.cpp')
-rw-r--r-- | backends/cloud/storage.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/backends/cloud/storage.cpp b/backends/cloud/storage.cpp index 23dcd8c379..0c5f6a39e7 100644 --- a/backends/cloud/storage.cpp +++ b/backends/cloud/storage.cpp @@ -42,7 +42,10 @@ void Storage::handler() { //TODO: lock mutex here (in case another handler() would be called before this one ends) warning("handler's here"); for (Common::Array<Request *>::iterator i = _requests.begin(); i != _requests.end();) { - if ((*i)->handle()) _requests.erase(i); + if ((*i)->handle()) { + delete (*i); + _requests.erase(i); + } else ++i; } if (_requests.empty()) stopTimer(); |