diff -r 68ef71f0cd72 -r 77effd21b2c9 commsfwsupport/commselements/serverden/src/sd_player.cpp --- a/commsfwsupport/commselements/serverden/src/sd_player.cpp Tue Feb 02 00:53:00 2010 +0200 +++ b/commsfwsupport/commselements/serverden/src/sd_player.cpp Sat Feb 20 00:01:55 2010 +0200 @@ -58,7 +58,7 @@ void CCommonSessionProxy::BeginSessionClose() { - //COMMONLOG((WorkerId(),KECommonBootingTag, _L8("CSockSessionProxy %08x:\tBeginSessionClose(), iSockSession %08x"), this, iSession) ); + COMMONLOG((Player().WorkerId(),KECommonBootingTag, _L8("CCommonSessionProxy %08x:\tBeginSessionClose(), iSockSession %08x"), this, iSession) ); /* Only do something if the message is within the deadline and we're sure the session pointer is safe to use */ CCommonWorkerThread& worker = iPlayer.WorkerThread(); @@ -87,7 +87,7 @@ EXPORT_C void CCommonSessionProxy::NotifySubSessionDestroyed() { - //COMMONLOG((WorkerId(),KECommonBootingTag, _L8("CSockSessionProxy %08x:\tNotifySubSessionDestroyed(), iSockSession %08x"), this, iSession) ); + //COMMONLOG((Player().WorkerId(),KECommonBootingTag, _L8("CCommonSessionProxy %08x:\tNotifySubSessionDestroyed(), iSockSession %08x"), this, iSession) ); if(IsClosing() && --iNumSubSessClosing <= 0) { __ASSERT_DEBUG(iNumSubSessClosing == 0, User::Panic(KSpecAssert_ElemSvrDenPlayrC, 2)); @@ -202,13 +202,22 @@ return EFalse; } } - return ETrue; + + if (!iSessionProxies.IsEmpty()) + { + COMMONLOG((WorkerId(), KECommonBootingTag, _L8("-- can't; session proxies still present"))); + return EFalse; + } + + + return ETrue; } EXPORT_C void CCommonPlayer::MaybeSetPlayerShutdownComplete(TBool aForceShutdownNow) { //A forced shutdown trumps all other considerations - TBool shutdownComplete = aForceShutdownNow || (SubSessions().Count() == 0 && IsPlayerShutdownComplete()); + TBool shutdownComplete = aForceShutdownNow + || (SubSessions().Count() == 0 && iSessionProxies.IsEmpty() && IsPlayerShutdownComplete()); COMMONLOG((WorkerId(), KECommonBootingTag, _L8("CPlayer::MaybeSetPlayerShutdownComplete(), shutdownComplete = %d [forced=%d, #subSess=%d]"), shutdownComplete, aForceShutdownNow, SubSessions().Count()));