phoneuis/Ussd/src/UssdAppUi.cpp
branchRCL_3
changeset 69 8baf28733c3d
parent 62 5266b1f337bd
equal deleted inserted replaced
62:5266b1f337bd 69:8baf28733c3d
   113         case EUssdMenuItemSend:
   113         case EUssdMenuItemSend:
   114         case EUssdSoftkeySend:
   114         case EUssdSoftkeySend:
   115             {
   115             {
   116             // Send string and exit the application
   116             // Send string and exit the application
   117             HBufC* buffer = iAppContainer->Editor().GetTextInHBufL();
   117             HBufC* buffer = iAppContainer->Editor().GetTextInHBufL();
       
   118             CleanupStack::PushL( buffer );
   118             __ASSERT_DEBUG(
   119             __ASSERT_DEBUG(
   119                 buffer->Length() <= KUssdEditorMaxLenght ,
   120                 buffer->Length() <= KUssdEditorMaxLenght ,
   120                 User::Invariant() );
   121                 User::Invariant() );
   121 
   122 
   122             if  ( buffer->Length() &&
   123             if  ( buffer->Length() &&
   123                   buffer->Length() <= KUssdEditorMaxLenght &&
   124                   buffer->Length() <= KUssdEditorMaxLenght &&
   124                   KErrNone == iComms->SendString( buffer->Des() ) )
   125                   KErrNone == iComms->SendString( buffer->Des() ) )
   125                 {
   126                 {
   126                 iComms->InformExitReason( EPhCltSendCompleted );
   127                 iComms->InformExitReason( EPhCltSendCompleted );
   127                 Exit();                
   128                 Exit();                
   128                 }         
   129                 }  
   129 
   130             CleanupStack::PopAndDestroy( buffer );
   130             delete buffer;
       
   131             break;
   131             break;
   132             }
   132             }
   133 
   133 
   134         case EAknCmdHelp:
   134         case EAknCmdHelp:
   135             {
   135             {