diff -r a117ad66e027 -r ff3fc7722556 genericservices/taskscheduler/SCHSVR/SchTimer.cpp --- a/genericservices/taskscheduler/SCHSVR/SchTimer.cpp Fri Sep 17 08:38:54 2010 +0300 +++ b/genericservices/taskscheduler/SCHSVR/SchTimer.cpp Mon Oct 04 02:56:42 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -17,6 +17,7 @@ #include "SchTimer.h" #include "SCHMAN.H" #include "SCHEDULE.H" +#include "schlogger.h" // system includes #include @@ -30,6 +31,8 @@ @internalComponent */ +_LIT(KTaskSchedulerPanic, "TaskScheduler "); + NONSHARABLE_CLASS(CScheduleTimer) : public CTimer { public: @@ -139,10 +142,11 @@ // From CActive void RunL(); void DoCancel(); + TInt RunError(TInt aError); public: void SetPropertyL(const TUid& aCategory, TUint aKey); - + private: TUid iCategory; TUint iKey; @@ -404,6 +408,7 @@ CPropertyNotifier::~CPropertyNotifier() { Cancel(); + iProperty.Close(); } void CPropertyNotifier::AttachL() @@ -416,7 +421,10 @@ void CPropertyNotifier::SetPropertyL(const TUid& aCategory, TUint aKey) { if (IsActive()) + { Cancel(); + iProperty.Close(); + } iCategory = aCategory; iKey = aKey; AttachL(); @@ -446,7 +454,15 @@ iProperty.Cancel(); } - +TInt CPropertyNotifier::RunError(TInt aError) + { + if (aError) + { + LOGSTRING("CPropertyNotifier::RunL() leaves."); + User::Panic(KTaskSchedulerPanic, aError); + } + return KErrNone; + } // @@ -627,4 +643,14 @@ return condition; } - +TInt CScheduleCriteriaManager::RunError(TInt aError) + { + if (aError) + { + LOGSTRING("CScheduleCriteriaManager::RunL() leaves."); + User::Panic(KTaskSchedulerPanic, aError); + } + return KErrNone; + } + +