diff -r 15bc1d5d6267 -r ae34e1715e21 ipsservices/ipssosaoplugin/src/IpsSosAOMboxLogic.cpp
--- a/ipsservices/ipssosaoplugin/src/IpsSosAOMboxLogic.cpp Fri Jul 23 19:09:50 2010 +0300
+++ b/ipsservices/ipssosaoplugin/src/IpsSosAOMboxLogic.cpp Thu Aug 05 21:09:09 2010 +0300
@@ -16,21 +16,11 @@
*
*/
-//
-#include
-//
-
-#include "emailtrace.h"
-#include "IpsSosAOMboxLogic.h"
-//
-#include "IpsSosAOSettingsHandler.h"
-//
-#include "IpsSosAOSchedulerUtils.h"
-#include "IpsSosAOPlugin.hrh"
-#include "IpsSosAOImapPopLogic.h"
+#include "ipssosaopluginheaders.h"
//
const TInt KAOSecondsInMinute = 60;
+const TInt KAODefaultInboxSyncTimeSecs = 3600;
//
const TInt KIpsSosAOMboxLogicMinGra = 1;
@@ -775,9 +765,21 @@
CIpsSosAOSettingsHandler* settings =
CIpsSosAOSettingsHandler::NewL(iSession, iMailboxId);
CleanupStack::PushL(settings);
- TInt secs = settings->InboxRefreshTime() * KAOSecondsInMinute;
+ TInt inboxRefreshTime = settings->InboxRefreshTime();
+ TInt secs = inboxRefreshTime * KAOSecondsInMinute;
+ INFO_1("CIpsSosAOMBoxLogic: inboxRefreshTime: %d", inboxRefreshTime);
INFO_1("CIpsSosAOMBoxLogic: timer scheduled: %d", secs);
- iTimer->After(secs);
+ if (secs > 0)
+ {
+ iTimer->After(TTimeIntervalSeconds(secs));
+ }
+ else
+ {
+ // panic at this point when we get zero time from settings
+ __ASSERT_DEBUG( EFalse, User::Panic( KIpsSosAOPanicLit, KErrGeneral) );
+ iTimer->After(TTimeIntervalSeconds(KAODefaultInboxSyncTimeSecs));
+ }
+
CleanupStack::PopAndDestroy(settings);
//
NM_COMMENT("CIpsSosAOMBoxLogic: switching state: EStateWaitSyncStart");