mtpfws/mtpfw/daemon/server/src/cmtpserver.cpp
changeset 52 866b4af7ffbe
parent 49 c20dd21d1eb4
child 60 841f70763fbe
equal deleted inserted replaced
51:64200268cac2 52:866b4af7ffbe
    75 CMTPServer::~CMTPServer()
    75 CMTPServer::~CMTPServer()
    76     {
    76     {
    77     OstTraceFunctionEntry0( CMTPSERVER_CMTPSERVER_DES_ENTRY ); 
    77     OstTraceFunctionEntry0( CMTPSERVER_CMTPSERVER_DES_ENTRY ); 
    78     delete iShutdown;
    78     delete iShutdown;
    79     iShutdown = NULL;
    79     iShutdown = NULL;
    80     iFrameworkSingletons.ConnectionMgr().StopTransports();
    80     if(iFrameworkSingletonsOpened)
    81     iFrameworkSingletons.DpController().UnloadDataProviders();
    81         {
    82     iFrameworkSingletons.Close();
    82         iFrameworkSingletons.ConnectionMgr().StopTransports();
       
    83         iFrameworkSingletons.DpController().UnloadDataProviders();
       
    84         iFrameworkSingletons.Close();	    
       
    85         }
    83     REComSession::FinalClose();
    86     REComSession::FinalClose();
    84     OstTraceFunctionExit0( CMTPSERVER_CMTPSERVER_DES_EXIT );
    87     OstTraceFunctionExit0( CMTPSERVER_CMTPSERVER_DES_EXIT );
    85     }
    88     }
    86 
    89 
    87 /**
    90 /**
   190 void CMTPServer::ConstructL()
   193 void CMTPServer::ConstructL()
   191     {
   194     {
   192     OstTraceFunctionEntry0( CMTPSERVER_CONSTRUCTL_ENTRY );
   195     OstTraceFunctionEntry0( CMTPSERVER_CONSTRUCTL_ENTRY );
   193     StartL(KMTPServerName);
   196     StartL(KMTPServerName);
   194     iFrameworkSingletons.OpenL();
   197     iFrameworkSingletons.OpenL();
       
   198     iFrameworkSingletonsOpened = ETrue;
   195     if (!iShutdown)
   199     if (!iShutdown)
   196         {
   200         {
   197         TRAPD(error, iShutdown = CMTPShutdown::NewL());
   201         TRAPD(error, iShutdown = CMTPShutdown::NewL());
   198         OstTrace0( TRACE_NORMAL, CMTPSERVER_CONSTRUCTL, "CMTPShutdown Loaded" );            
   202         OstTrace0( TRACE_NORMAL, CMTPSERVER_CONSTRUCTL, "CMTPShutdown Loaded" );            
   199         UNUSED_VAR(error);    
   203         UNUSED_VAR(error);