Some fixes to connection manager.
[jenirok] / src / common / mobil1881.cpp
index 6ded070..69327b0 100644 (file)
@@ -95,7 +95,6 @@ void Mobil1881::handleHttpError(int id)
         if(pendingSearches_.at(i) && pendingSearches_.at(i)->searchIds.find(id) !=
             pendingSearches_.at(i)->searchIds.end())
         {
         if(pendingSearches_.at(i) && pendingSearches_.at(i)->searchIds.find(id) !=
             pendingSearches_.at(i)->searchIds.end())
         {
-
             setError(Source::CONNECTION_FAILURE, http_.errorString());
             emitRequestFinished(pendingSearches_.at(i), true, i);
             break;
             setError(Source::CONNECTION_FAILURE, http_.errorString());
             emitRequestFinished(pendingSearches_.at(i), true, i);
             break;
@@ -107,6 +106,12 @@ void Mobil1881::addNumbers(SearchData* searchData,
                            QString const& data,
                            int index)
 {
                            QString const& data,
                            int index)
 {
+    if(data.isEmpty())
+    {
+        qDebug() << "Server returned no data";
+        qDebug() << "Headers: " << http_.lastResponse().toString();
+    }
+
     if(data.indexOf("<b>Last ned vCard</b>") > 0)
     {
         addOnlyNumber(searchData, data, index);
     if(data.indexOf("<b>Last ned vCard</b>") > 0)
     {
         addOnlyNumber(searchData, data, index);