datacommsserver/esockserver/test/TE_RConnectionSuite/src/TE_RConnectionDummyNifTestSteps.cpp
changeset 65 41cc8e7ff496
parent 25 e53adc4c49de
equal deleted inserted replaced
40:34fc115b8742 65:41cc8e7ff496
   140 	Cancel();
   140 	Cancel();
   141 	}
   141 	}
   142 
   142 
   143 void CProgressWatcherTest1b::DoCancel()
   143 void CProgressWatcherTest1b::DoCancel()
   144 	{
   144 	{
   145 	iConnection.CancelProgressNotification();
   145     if (iConnection.SubSessionHandle() != 0)
       
   146         {
       
   147         iConnection.CancelProgressNotification();
       
   148         }
   146 	}
   149 	}
   147 
   150 
   148 void CProgressWatcherTest1b::RunL()
   151 void CProgressWatcherTest1b::RunL()
   149 	{
   152 	{
   150 	if(iStatus == KErrNone)
   153 	if(iStatus == KErrNone)
   218 	{
   221 	{
   219 	if(iConnection.SubSessionHandle() && iProgressWatcher)
   222 	if(iConnection.SubSessionHandle() && iProgressWatcher)
   220 		{
   223 		{
   221 		INFO_PRINTF2(_L("Closing Connection at Stage %d"), iProgressWatcher->Progress()().iStage);
   224 		INFO_PRINTF2(_L("Closing Connection at Stage %d"), iProgressWatcher->Progress()().iStage);
   222 		}
   225 		}
   223 
       
   224 	Cancel();
       
   225 	
   226 	
       
   227     Cancel();
   226 	delete iProgressWatcher;
   228 	delete iProgressWatcher;
   227 	iProgressWatcher = NULL;
   229 	iProgressWatcher = NULL;
   228 	iConnection.Close();
   230 
   229 	iSocketServ.Close();
   231 	iSocketServ.Close();
   230 	}
   232 	}
   231 
   233 
   232 void CConnectionTest1b::Start()
   234 void CConnectionTest1b::Start()
   233 	{
   235 	{
   242 	iProgressWatcher = NULL;
   244 	iProgressWatcher = NULL;
   243 	}
   245 	}
   244 
   246 
   245 void CConnectionTest1b::DoCancel()
   247 void CConnectionTest1b::DoCancel()
   246 	{
   248 	{
       
   249     iConnection.Close();
   247 	StopProgressObservation();
   250 	StopProgressObservation();
   248 	}
   251 	}
   249 
   252 
   250 void CConnectionTest1b::RunL()
   253 void CConnectionTest1b::RunL()
   251 	{
   254 	{