diff -r 6e82ae192c3a -r 3ae5cb0b4c02 mtpfws/mtpfw/daemon/server/src/cmtpserver.cpp --- a/mtpfws/mtpfw/daemon/server/src/cmtpserver.cpp Mon May 03 13:19:02 2010 +0300 +++ b/mtpfws/mtpfw/daemon/server/src/cmtpserver.cpp Fri Jun 25 16:54:01 2010 +0800 @@ -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")); }