networksecurity/tls/protocol/tlsconnection.cpp
changeset 69 955592283707
parent 14 b33c3d136b7e
child 68 1697cc2ba93d
equal deleted inserted replaced
66:34ec136802c5 69:955592283707
  1182 
  1182 
  1183    iRecordParser->IgnoreAppData( 0 );
  1183    iRecordParser->IgnoreAppData( 0 );
  1184    __ASSERT_DEBUG( !aStateMachine->SuspendRequest(), TlsPanic(ETlsPanicStateMachineStopped) );
  1184    __ASSERT_DEBUG( !aStateMachine->SuspendRequest(), TlsPanic(ETlsPanicStateMachineStopped) );
  1185    if ( aStateMachine->LastError() != KErrNone )
  1185    if ( aStateMachine->LastError() != KErrNone )
  1186    {//user will be notified after return from this fn
  1186    {//user will be notified after return from this fn
       
  1187        LOG(Log::Printf(_L("CTlsConnection::OnCompletion() aStateMachine->LastError() %d"), aStateMachine->LastError() );)
  1187 	   if ( iHandshake != aStateMachine )
  1188 	   if ( iHandshake != aStateMachine )
  1188 	      {
  1189 	      {
  1189 		   return EFalse;
  1190 		   return EFalse;
  1190 	      }
  1191 	      }
  1191       else
  1192       else
  1207             iRecvAppData->ResumeL( *this ) );
  1208             iRecvAppData->ResumeL( *this ) );
  1208          if ( ret != KErrNone )
  1209          if ( ret != KErrNone )
  1209          {//something went completely wrong
  1210          {//something went completely wrong
  1210           //set last error so that the user will be notified after return from this fn
  1211           //set last error so that the user will be notified after return from this fn
  1211             aStateMachine->SetLastError( ret );
  1212             aStateMachine->SetLastError( ret );
       
  1213             LOG(Log::Printf(_L("CTlsConnection::OnCompletion() - AppData->ResumeL Last Error %d"), aStateMachine->LastError() );)
  1212             delete iSendAppData;
  1214             delete iSendAppData;
  1213             iSendAppData = NULL;
  1215             iSendAppData = NULL;
  1214             delete iRecvAppData;
  1216             delete iRecvAppData;
  1215             iRecvAppData = NULL;
  1217             iRecvAppData = NULL;
  1216          }
  1218          }
  1231       else if ( !IsInDataMode() )
  1233       else if ( !IsInDataMode() )
  1232       {
  1234       {
  1233 	     // Create the Data state machines so that the user can send/receive data
  1235 	     // Create the Data state machines so that the user can send/receive data
  1234          __ASSERT_DEBUG( !iRecvAppData && !iSendAppData, TlsPanic(ETlsPanicStateMachineAlreadyExists));
  1236          __ASSERT_DEBUG( !iRecvAppData && !iSendAppData, TlsPanic(ETlsPanicStateMachineAlreadyExists));
  1235       
  1237       
       
  1238          LOG(Log::Printf(_L(" Create the Data state machines so that the user can send/receive data") );)
  1236 	     //don't change the order see CRecvAppData::ResumeL
  1239 	     //don't change the order see CRecvAppData::ResumeL
  1237 	     TRAPD( ret, iSendAppData = CSendAppData::NewL( *iRecordComposer );
  1240 	     TRAPD( ret, iSendAppData = CSendAppData::NewL( *iRecordComposer );
  1238 		     iRecvAppData = CRecvAppData::NewL( *this ) );
  1241 		     iRecvAppData = CRecvAppData::NewL( *this ) );
  1239          if ( ret != KErrNone )
  1242          if ( ret != KErrNone )
  1240          {//something went completely wrong
  1243          {//something went completely wrong
  1241           //set last error so that the user will be notified after return from this fn
  1244           //set last error so that the user will be notified after return from this fn
  1242             aStateMachine->SetLastError( ret );
  1245             aStateMachine->SetLastError( ret );
       
  1246             LOG(Log::Printf(_L("CTlsConnection::OnCompletion() AppData::NewL Last Error %d"), aStateMachine->LastError() );)
  1243             //delete what may have been created
  1247             //delete what may have been created
  1244             delete iRecvAppData;
  1248             delete iRecvAppData;
  1245             iRecvAppData = 0;
  1249             iRecvAppData = 0;
  1246             delete iSendAppData;
  1250             delete iSendAppData;
  1247             iSendAppData = 0;
  1251             iSendAppData = 0;