localconnectivityservice/dun/utils/src/DunDataPusher.cpp
changeset 52 866b4af7ffbe
parent 29 3ae5cb0b4c02
child 54 4dc88a4ac6f4
--- a/localconnectivityservice/dun/utils/src/DunDataPusher.cpp	Fri Sep 17 11:40:03 2010 +0800
+++ b/localconnectivityservice/dun/utils/src/DunDataPusher.cpp	Tue Sep 28 20:14:08 2010 +0800
@@ -194,7 +194,6 @@
         FTRACE(FPrint( _L("CDunDataPusher::SendQueuedData() (ERROR) complete" )));
         return EFalse;
         }
-    iPushState = EDunStateDataPushing;
     FTRACE(FPrint( _L("CDunDataPusher::SendQueuedData() complete (%d)" ), iEventQueue.Count() ));
     return ETrue;
     }
@@ -338,21 +337,24 @@
     if ( iComm )
         {
         iStatus = KRequestPending;
+        iPushState = EDunStateDataPushing;
         iComm->Write( iStatus, *dataToPush );
-        FTRACE(FPrint( _L("CDunDataPusher::ManageOneEvent() RComm Write() requested (buffer=0x%08X)" ), dataToPush ));
+        SetActive();
+        FTRACE(FPrint( _L("CDunDataPusher::ManageOneEvent() RComm Write() requested for %d bytes... (buffer=0x%08X)" ), dataToPush->Length(), dataToPush ));
         }
     else if ( iSocket )
         {
         iStatus = KRequestPending;
+        iPushState = EDunStateDataPushing;
         iSocket->Send( *dataToPush, 0, iStatus );
-        FTRACE(FPrint( _L("CDunDataPusher::ManageOneEvent() RSocket Send() requested (buffer=0x%08X)" ), dataToPush ));
+        SetActive();
+        FTRACE(FPrint( _L("CDunDataPusher::ManageOneEvent() RSocket Send() requested for %d bytes... (buffer=0x%08X)" ), dataToPush->Length(), dataToPush ));
         }
     else
         {
         FTRACE(FPrint( _L("CDunDataPusher::ManageOneEvent() (ERROR) complete" )));
         return KErrGeneral;
         }
-    SetActive();
     FTRACE(FPrint( _L("CDunDataPusher::ManageOneEvent() complete" )));
     return KErrNone;
     }
@@ -412,6 +414,7 @@
         }  // if ( !stop )
     else  // stop -> tear down connection
         {
+        iPushState = EDunStateIdle;
         TDunConnectionReason connReason;
         connReason.iReasonType = EDunReasonTypeRW;
         connReason.iContext = EDunMediaContextLocal;