projects
/
jenirok
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changed search to retry automatically couple of times before failing.
[jenirok]
/
src
/
common
/
eniro.cpp
diff --git
a/src/common/eniro.cpp
b/src/common/eniro.cpp
index
46fda30
..
edffeed
100644
(file)
--- a/
src/common/eniro.cpp
+++ b/
src/common/eniro.cpp
@@
-201,6
+201,13
@@
void Eniro::handleHttpData(int id, QByteArray const& data)
if((searchIt = pendingSearches_.find(id)) !=
pendingSearches_.end())
{
if((searchIt = pendingSearches_.find(id)) !=
pendingSearches_.end())
{
+ if(data.isEmpty())
+ {
+ setError(CONNECTION_FAILURE, "Server returned empty data");
+ emitRequestFinished(id, searchIt.value(), true);
+ return;
+ }
+
// Load results from html data
loadResults(id, data);
}
// Load results from html data
loadResults(id, data);
}
@@
-209,6
+216,13
@@
void Eniro::handleHttpData(int id, QByteArray const& data)
else if((numberIt = pendingNumberRequests_.find(id)) !=
pendingNumberRequests_.end())
{
else if((numberIt = pendingNumberRequests_.find(id)) !=
pendingNumberRequests_.end())
{
+ if(data.isEmpty())
+ {
+ setError(CONNECTION_FAILURE, "Server returned empty data");
+ emitRequestFinished(id, searchIt.value(), true);
+ return;
+ }
+
// Load number from html data
loadNumber(id, data);
}
// Load number from html data
loadNumber(id, data);
}