mtpfws/mtpfw/daemon/server/src/cmtpserver.cpp
changeset 60 841f70763fbe
parent 52 866b4af7ffbe
equal deleted inserted replaced
52:866b4af7ffbe 60:841f70763fbe
    79     iShutdown = NULL;
    79     iShutdown = NULL;
    80     if(iFrameworkSingletonsOpened)
    80     if(iFrameworkSingletonsOpened)
    81         {
    81         {
    82         iFrameworkSingletons.ConnectionMgr().StopTransports();
    82         iFrameworkSingletons.ConnectionMgr().StopTransports();
    83         iFrameworkSingletons.DpController().UnloadDataProviders();
    83         iFrameworkSingletons.DpController().UnloadDataProviders();
    84         iFrameworkSingletons.Close();	    
    84         iFrameworkSingletons.Close();	 
       
    85         iFrameworkSingletonsOpened = EFalse;
    85         }
    86         }
    86     REComSession::FinalClose();
    87     REComSession::FinalClose();
    87     OstTraceFunctionExit0( CMTPSERVER_CMTPSERVER_DES_EXIT );
    88     OstTraceFunctionExit0( CMTPSERVER_CMTPSERVER_DES_EXIT );
    88     }
    89     }
    89 
    90 
   143 */
   144 */
   144 void CMTPServer::DropSession()
   145 void CMTPServer::DropSession()
   145     {
   146     {
   146     OstTraceFunctionEntry0( CMTPSERVER_DROPSESSION_ENTRY );
   147     OstTraceFunctionEntry0( CMTPSERVER_DROPSESSION_ENTRY );
   147          
   148          
   148     if (--iSessionCount==0 && iFrameworkSingletons.ConnectionMgr().TransportCount() == 0)
   149     if (--iSessionCount==0 && iFrameworkSingletonsOpened && iFrameworkSingletons.ConnectionMgr().TransportCount() == 0)
   149         {
   150         {
   150         // No active MTP client API sessions remain, start the shutdown timer.
   151         // No active MTP client API sessions remain, start the shutdown timer.
   151         if (iShutdown)
   152         if (iShutdown)
   152             {
   153             {
   153             OstTrace0( TRACE_NORMAL, CMTPSERVER_DROPSESSION, "Shutdown Started" );           
   154             OstTrace0( TRACE_NORMAL, CMTPSERVER_DROPSESSION, "Shutdown Started" );           
   180 
   181 
   181 /**
   182 /**
   182 Constructor.
   183 Constructor.
   183 */    
   184 */    
   184 CMTPServer::CMTPServer() : 
   185 CMTPServer::CMTPServer() : 
   185     CPolicyServer(CActive::EPriorityStandard, KMTPServerPolicy)
   186     CPolicyServer(CActive::EPriorityStandard, KMTPServerPolicy),iFrameworkSingletonsOpened(EFalse)
   186     {
   187     {
   187 
   188 
   188     }
   189     }
   189     
   190     
   190 /**
   191 /**