hti/HtiFramework/src/HtiCommAdapter.cpp
branchRCL_3
changeset 9 8a14024f954a
parent 4 73ff0d268e1d
--- a/hti/HtiFramework/src/HtiCommAdapter.cpp	Fri Mar 12 15:50:45 2010 +0200
+++ b/hti/HtiFramework/src/HtiCommAdapter.cpp	Mon Mar 15 12:46:13 2010 +0200
@@ -213,6 +213,11 @@
     // USB errors from d32usbc.h
     else if ( -6700 > iStatus.Int() && iStatus.Int() > -6712 )
         {
+        if(iDispatcher->CommReconnect())
+            {
+            return;
+            }
+
         if ( iDispatcher->GetShowErrorDialogs() )
             {
             TBuf<48> errorText;
@@ -226,6 +231,11 @@
     else if ( iStatus == KErrDisconnected )
         {
         // This happens if Bluetooth connection is lost.
+        if(iDispatcher->CommReconnect())
+            {
+            return;
+            }
+        
         if ( iDispatcher->GetShowErrorDialogs() )
             {
             CHtiNotifier::ShowErrorL(
@@ -259,6 +269,7 @@
                 {
                 HTI_LOG_FORMAT( "Error %d, reissue request", iStatus.Int() );
                 iDispatcher->Notify( iStatus.Int() );
+                User::After(2000000);
                 ReceiveMessage();
                 }
             break;
@@ -289,7 +300,7 @@
                 iMsgToReceive = NULL;
 
                 iDispatcher->Notify( iStatus.Int() );
-
+                User::After(2000000);
                 ReceiveMessage();
                 }
             break;