networksecurity/tls/protocol/tlsconnection.cpp
branchRCL_3
changeset 63 425d8f4f7fa5
parent 58 8d540f55e491
child 67 bb2423252ea3
equal deleted inserted replaced
58:8d540f55e491 63:425d8f4f7fa5
  1236 
  1236 
  1237    iRecordParser->IgnoreAppData( 0 );
  1237    iRecordParser->IgnoreAppData( 0 );
  1238    __ASSERT_DEBUG( !aStateMachine->SuspendRequest(), TlsPanic(ETlsPanicStateMachineStopped) );
  1238    __ASSERT_DEBUG( !aStateMachine->SuspendRequest(), TlsPanic(ETlsPanicStateMachineStopped) );
  1239    if ( aStateMachine->LastError() != KErrNone )
  1239    if ( aStateMachine->LastError() != KErrNone )
  1240    {//user will be notified after return from this fn
  1240    {//user will be notified after return from this fn
       
  1241        LOG(Log::Printf(_L("CTlsConnection::OnCompletion() aStateMachine->LastError() %d"), aStateMachine->LastError() );)
  1241 	   if ( iHandshake != aStateMachine )
  1242 	   if ( iHandshake != aStateMachine )
  1242 	      {
  1243 	      {
  1243 		   return EFalse;
  1244 		   return EFalse;
  1244 	      }
  1245 	      }
  1245       else
  1246       else
  1261             iRecvAppData->ResumeL( *this ) );
  1262             iRecvAppData->ResumeL( *this ) );
  1262          if ( ret != KErrNone )
  1263          if ( ret != KErrNone )
  1263          {//something went completely wrong
  1264          {//something went completely wrong
  1264           //set last error so that the user will be notified after return from this fn
  1265           //set last error so that the user will be notified after return from this fn
  1265             aStateMachine->SetLastError( ret );
  1266             aStateMachine->SetLastError( ret );
       
  1267             LOG(Log::Printf(_L("CTlsConnection::OnCompletion() - AppData->ResumeL Last Error %d"), aStateMachine->LastError() );)
  1266             delete iSendAppData;
  1268             delete iSendAppData;
  1267             iSendAppData = NULL;
  1269             iSendAppData = NULL;
  1268             delete iRecvAppData;
  1270             delete iRecvAppData;
  1269             iRecvAppData = NULL;
  1271             iRecvAppData = NULL;
  1270          }
  1272          }
  1285       else if ( !IsInDataMode() )
  1287       else if ( !IsInDataMode() )
  1286       {
  1288       {
  1287 	     // Create the Data state machines so that the user can send/receive data
  1289 	     // Create the Data state machines so that the user can send/receive data
  1288          __ASSERT_DEBUG( !iRecvAppData && !iSendAppData, TlsPanic(ETlsPanicStateMachineAlreadyExists));
  1290          __ASSERT_DEBUG( !iRecvAppData && !iSendAppData, TlsPanic(ETlsPanicStateMachineAlreadyExists));
  1289       
  1291       
       
  1292          LOG(Log::Printf(_L(" Create the Data state machines so that the user can send/receive data") );)
  1290 	     //don't change the order see CRecvAppData::ResumeL
  1293 	     //don't change the order see CRecvAppData::ResumeL
  1291 	     TRAPD( ret, iSendAppData = CSendAppData::NewL( *iRecordComposer );
  1294 	     TRAPD( ret, iSendAppData = CSendAppData::NewL( *iRecordComposer );
  1292 		     iRecvAppData = CRecvAppData::NewL( *this ) );
  1295 		     iRecvAppData = CRecvAppData::NewL( *this ) );
  1293          if ( ret != KErrNone )
  1296          if ( ret != KErrNone )
  1294          {//something went completely wrong
  1297          {//something went completely wrong
  1295           //set last error so that the user will be notified after return from this fn
  1298           //set last error so that the user will be notified after return from this fn
  1296             aStateMachine->SetLastError( ret );
  1299             aStateMachine->SetLastError( ret );
       
  1300             LOG(Log::Printf(_L("CTlsConnection::OnCompletion() AppData::NewL Last Error %d"), aStateMachine->LastError() );)
  1297             //delete what may have been created
  1301             //delete what may have been created
  1298             delete iRecvAppData;
  1302             delete iRecvAppData;
  1299             iRecvAppData = 0;
  1303             iRecvAppData = 0;
  1300             delete iSendAppData;
  1304             delete iSendAppData;
  1301             iSendAppData = 0;
  1305             iSendAppData = 0;