Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorАлександр Зацепин <az@mapswithme.com>2017-09-07 21:06:17 +0300
committerАлександр Зацепин <az@mapswithme.com>2017-09-07 21:28:40 +0300
commit4b008b2c29f7fdcd6bd51e06682071875b09916a (patch)
treecf4246174963e1d423e15ab7effe0efc08f259d5
parent69df1599cd0a0c575caa910365d4970d68066494 (diff)
[android] Fixed crash while terminating any chunk during downloading mwmbeta-994MAPSME-5584-crash-in-downloader
-rw-r--r--android/src/com/mapswithme/maps/downloader/UpdaterDialogFragment.java1
-rw-r--r--platform/http_request.cpp8
2 files changed, 1 insertions, 8 deletions
diff --git a/android/src/com/mapswithme/maps/downloader/UpdaterDialogFragment.java b/android/src/com/mapswithme/maps/downloader/UpdaterDialogFragment.java
index 9520063397..0fc91ce0e7 100644
--- a/android/src/com/mapswithme/maps/downloader/UpdaterDialogFragment.java
+++ b/android/src/com/mapswithme/maps/downloader/UpdaterDialogFragment.java
@@ -396,6 +396,7 @@ public class UpdaterDialogFragment extends BaseMwmDialogFragment
}
else
{
+ MapManager.nativeCancel(CountryItem.getRootId());
mFragment.finish();
}
}
diff --git a/platform/http_request.cpp b/platform/http_request.cpp
index 846646194c..a8f49ff7c9 100644
--- a/platform/http_request.cpp
+++ b/platform/http_request.cpp
@@ -218,9 +218,6 @@ class FileHttpRequest : public HttpRequest, public IHttpThreadCallback
void SaveResumeChunks()
{
- if (m_writer == nullptr)
- return;
-
try
{
// Flush writer before saving downloaded chunks.
@@ -278,11 +275,6 @@ class FileHttpRequest : public HttpRequest, public IHttpThreadCallback
if (m_status != ECompleted && m_goodChunksCount % 10 == 0)
SaveResumeChunks();
}
- else if (result == ChunksDownloadStrategy::ENoFreeServers)
- {
- // There is no server which is able to re-download chunk.
- m_status = EFailed;
- }
if (m_status != EInProgress)
{