diff -r 85e0c0339cc3 -r 883e91c086aa mtpfws/mtpfw/daemon/server/src/cmtpserver.cpp --- a/mtpfws/mtpfw/daemon/server/src/cmtpserver.cpp Fri Jun 11 14:27:06 2010 +0300 +++ b/mtpfws/mtpfw/daemon/server/src/cmtpserver.cpp Tue Jul 06 15:13:34 2010 +0300 @@ -73,6 +73,7 @@ { __FLOG(_L8("~CMTPServer - Entry")); delete iShutdown; + iShutdown = NULL; iFrameworkSingletons.ConnectionMgr().StopTransports(); iFrameworkSingletons.DpController().UnloadDataProviders(); iFrameworkSingletons.Close(); @@ -139,12 +140,6 @@ if (--iSessionCount==0 && iFrameworkSingletons.ConnectionMgr().TransportCount() == 0) { // No active MTP client API sessions remain, start the shutdown timer. - if (!iShutdown) - { - TRAPD(error, iShutdown = CMTPShutdown::NewL()); - __FLOG(_L8("CMTPShutdown Loaded- Entry")); - UNUSED_VAR(error); - } if (iShutdown) { __FLOG(_L8("Shutdown Started - Entry")); @@ -193,6 +188,12 @@ __FLOG(_L8("ConstructL - Entry")); StartL(KMTPServerName); iFrameworkSingletons.OpenL(); + if (!iShutdown) + { + TRAPD(error, iShutdown = CMTPShutdown::NewL()); + __FLOG(_L8("CMTPShutdown Loaded- Entry")); + UNUSED_VAR(error); + } __FLOG(_L8("ConstructL - Exit")); }