diff -r 3553901f7fa8 -r 1f776524b15c telephonyserverplugins/common_tsy/commontsy/src/mmcustomtsy/CMmSIMTsy.cpp --- a/telephonyserverplugins/common_tsy/commontsy/src/mmcustomtsy/CMmSIMTsy.cpp Tue Feb 02 01:41:59 2010 +0200 +++ b/telephonyserverplugins/common_tsy/commontsy/src/mmcustomtsy/CMmSIMTsy.cpp Fri Mar 19 09:55:57 2010 +0200 @@ -556,6 +556,7 @@ TInt aError ) { TFLOGSTRING("TSY: CMmSIMTsy::CompleteReadViagHomeZoneCacheRespL"); + iLastViagHomeZoneCacheError = aError; if (iCurrentlyRetrievedCache == NULL) { // Got an unexpected update... ignore! @@ -643,9 +644,21 @@ else { // caching aborted - delete iCurrentlyRetrievedCache; - iCurrentlyRetrievedCache = NULL; + delete iCurrentlyRetrievedCache; + iCurrentlyRetrievedCache = NULL; TFLOGSTRING2("TSY: CMmSIMTsy::CompleteReadViagHomeZoneCacheRespL:There was a problem reading cache values from SIM, error=%d", aError); + //iViagHomeZoneCacheReady = ETrue; +TFLOGSTRING("TSY: CMmSIMTsy::CompleteReadViagHomeZoneCacheRespL: Caching completed unsuccessfully!"); + + for (TInt i = 0; i < iReadViagHomeZoneCacheRequests.Count(); i++) + { +TFLOGSTRING2("TSY: CMmSIMTsy::CompleteReadDynamicViagHomeZoneCacheRespL: for i:%d", i); + TReadViagHomeZoneCacheRequest* req = + iReadViagHomeZoneCacheRequests[i]; + iMmCustomTsy->ReqCompleted(req->iReqHandle, aError); + } + iReadViagHomeZoneCacheRequests.ResetAndDestroy(); + } } @@ -748,6 +761,11 @@ req->iViagRecordId = aViagRecordId; req->iViagRecordContent = aViagRecordContent; iReadViagHomeZoneCacheRequests.AppendL( req ); + if(iLastViagHomeZoneCacheError != KErrNone) + { + // Got an error last time, ask again + StartDynamicCachingL(); + } } // complete to client @@ -882,7 +900,7 @@ void CMmSIMTsy::StartDynamicCachingL() { TFLOGSTRING("TSY: CMmSIMTsy::StartDynamicCachingL"); - + iLastViagHomeZoneCacheError = KErrNone; // Make sure there are no ongoing dynamic caching requests.. if( iCurrentlyRetrievedCache ) {