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:
authorSergey Pisarchik <pisarchik@mapswithme.com>2014-05-03 23:03:39 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:15:10 +0300
commit93db6ec22bc95587dbfe3bfd6cbfcd963c8ecd49 (patch)
tree3b5c34fde6acc0f41b49c64cbe96c2e907d08b07 /platform/http_thread_tizen.cpp
parent3b576c987f891abf930b282257c16e0e264bd643 (diff)
[Tizen] Add some http callback calls
Diffstat (limited to 'platform/http_thread_tizen.cpp')
-rw-r--r--platform/http_thread_tizen.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/platform/http_thread_tizen.cpp b/platform/http_thread_tizen.cpp
index 92705351d8..80e905d01e 100644
--- a/platform/http_thread_tizen.cpp
+++ b/platform/http_thread_tizen.cpp
@@ -128,6 +128,9 @@ void HttpThread::OnTransactionHeaderCompleted(HttpSession & httpSession,
if ((r = GetLastResult()) != E_SUCCESS)
{
LOG(LWARNING, ("httpTransaction.GetResponse error", r));
+ httpSession.CancelTransaction(httpTransaction);
+ httpSession.CloseTransaction(httpTransaction);
+ m_callback.OnFinish(-1, m_begRange, m_endRange);
return;
}
@@ -138,8 +141,9 @@ void HttpThread::OnTransactionHeaderCompleted(HttpSession & httpSession,
if ((isChunk && httpStatusCode != 206) || (!isChunk && httpStatusCode != 200))
{
LOG(LWARNING, ("Http request to", m_url, " aborted with HTTP code", httpStatusCode));
- r = httpSession.CancelTransaction(httpTransaction);
+ httpSession.CancelTransaction(httpTransaction);
r = httpSession.CloseTransaction(httpTransaction);
+ m_callback.OnFinish(-4, m_begRange, m_endRange);
LOG(LDEBUG, ("CloseTransaction result", r));
return;
}
@@ -169,8 +173,9 @@ void HttpThread::OnTransactionHeaderCompleted(HttpSession & httpSession,
{
LOG(LWARNING, ("Http request to", m_url,
"aborted - invalid Content-Range:", value, " expected:" ,m_expectedSize ));
- r = httpSession.CancelTransaction(httpTransaction);
+ httpSession.CancelTransaction(httpTransaction);
r = httpSession.CloseTransaction(httpTransaction);
+ m_callback.OnFinish(-2, m_begRange, m_endRange);
LOG(LDEBUG, ("CloseTransaction result", r));
}
}
@@ -193,8 +198,9 @@ void HttpThread::OnTransactionHeaderCompleted(HttpSession & httpSession,
{
LOG(LWARNING, ("Http request to", m_url,
"aborted - invalid Content-Length:", value, " expected:" ,m_expectedSize ));
- r = httpSession.CancelTransaction(httpTransaction);
+ httpSession.CancelTransaction(httpTransaction);
r = httpSession.CloseTransaction(httpTransaction);
+ m_callback.OnFinish(-2, m_begRange, m_endRange);
LOG(LDEBUG, ("CloseTransaction result", r));
}
}
@@ -206,8 +212,9 @@ void HttpThread::OnTransactionHeaderCompleted(HttpSession & httpSession,
LOG(LWARNING, ("Http request to", m_url,
"aborted, server didn't send any valid file size"));
- r = httpSession.CancelTransaction(httpTransaction);
+ httpSession.CancelTransaction(httpTransaction);
r = httpSession.CloseTransaction(httpTransaction);
+ m_callback.OnFinish(-2, m_begRange, m_endRange);
LOG(LDEBUG, ("CloseTransaction result", r));
}
}