phoneclientserver/phoneserver/Src/Standard/CPhSrvSession.cpp
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 
    19 
    20 // INCLUDE FILES
    20 // INCLUDE FILES
    21 #include "cphsrvserver.h" 
    21 #include "CPhSrvServer.h"
    22 #include "cphsrvsession.h" 
    22 #include "CPhSrvSession.h"
    23 #include "cphsrvsubsessionbase.h" 
    23 #include "CPhSrvSubSessionBase.h"
    24 #include "phsrvsubsessionfactory.h" 
    24 #include "PhSrvSubSessionFactory.h"
    25 #include "phcltclientserver.h" 
    25 #include "PhCltClientServer.h"
    26 
    26 
    27 // CONSTANTS
    27 // CONSTANTS
    28 
    28 
    29 
    29 
    30 
    30 
    58 // -----------------------------------------------------------------------------
    58 // -----------------------------------------------------------------------------
    59 // CPhSrvSession::~CPhSrvSession
    59 // CPhSrvSession::~CPhSrvSession
    60 // Destructor.
    60 // Destructor.
    61 // -----------------------------------------------------------------------------
    61 // -----------------------------------------------------------------------------
    62 //
    62 //
       
    63 
    63 CPhSrvSession::~CPhSrvSession()
    64 CPhSrvSession::~CPhSrvSession()
    64     {
    65     {
    65     if ( iServer )
    66     if ( iServer )
    66         {
    67         {
    67         iServer->CancelCreateAll( *this );
    68         iServer->CancelCreateAll( *this );
    68         }
    69         }
    69 
    70 
    70     delete iObjectIx;
    71     delete iObjectIx;
    71    
    72 
    72    if ( iContainer )
    73     if ( iContainer )
    73         {
    74         {
       
    75         //coverity[var_deref_model]
    74         iServer->RemoveContainer( iContainer );
    76         iServer->RemoveContainer( iContainer );
    75         iContainer = NULL;
    77         iContainer = NULL;
    76         }
    78         }
    77     }
    79     }
    78 
    80 
   179         CPhSrvSubSessionBase* subSession = 
   181         CPhSrvSubSessionBase* subSession = 
   180             static_cast< CPhSrvSubSessionBase* >( object );
   182             static_cast< CPhSrvSubSessionBase* >( object );
   181         
   183         
   182         if ( subSession )
   184         if ( subSession )
   183             {
   185             {
   184             // Check that the subsession can handle this request
   186 	        // Check that the subsession can handle this request
   185             if ( !subSession->PhSrvMessageDecoderCanProcessMessage( function ) )
   187 	        if ( !subSession->PhSrvMessageDecoderCanProcessMessage( function ) )
   186                 {
   188 	            {
   187                 PanicClient(
   189 	            PanicClient(
   188                     aMessage,
   190 	                aMessage,
   189                     EPhCltServerInitiatedPanicInvalidHandle );
   191 	                EPhCltServerInitiatedPanicInvalidHandle );
   190                 }
   192 	            }
   191             else
   193 	        else
   192                 {
   194 	            {
   193                 // Get it to process this request
   195 	            // Get it to process this request
   194                 subSession->PhSrvMessageProcessorHandleMessageL( aMessage );
   196 	            subSession->PhSrvMessageProcessorHandleMessageL( aMessage );
   195                 }
   197 	            }
   196             }            
   198             }            
   197         }
   199         }
   198     }
   200     }
   199 
   201 
   200 
   202