equal
deleted
inserted
replaced
140 |
140 |
141 // first opening we have to Internalize |
141 // first opening we have to Internalize |
142 DoOpenL(); |
142 DoOpenL(); |
143 // defect fix for EDNJJUN-4WYJGP |
143 // defect fix for EDNJJUN-4WYJGP |
144 // Unable to send sms cause sms*.dat is corrupted |
144 // Unable to send sms cause sms*.dat is corrupted |
145 // TODO - has to be back ported to higher versions |
|
146 TRAPD(ret, InternalizeEntryArrayL()); |
145 TRAPD(ret, InternalizeEntryArrayL()); |
147 if (ret != KErrNone) |
146 if (ret != KErrNone) |
148 { |
147 { |
149 LOGGSMU2("WARNING: InteralizeEntryArrayL left with %d", ret); |
148 LOGGSMU2("WARNING: InteralizeEntryArrayL left with %d", ret); |
150 } |
149 } |
181 User::Leave(err); |
180 User::Leave(err); |
182 } |
181 } |
183 #else |
182 #else |
184 DoCommitAndCompactL(); |
183 DoCommitAndCompactL(); |
185 #endif |
184 #endif |
186 |
|
187 //TODO AA: What should we do if err == KErrCorrupt? |
|
188 |
185 |
189 CleanupStack::Pop(this); |
186 CleanupStack::Pop(this); |
190 iInTransaction = EFalse; |
187 iInTransaction = EFalse; |
191 |
188 |
192 RemoveDeletedEntries(); |
189 RemoveDeletedEntries(); |
681 LOGGSMU4("CSARStore::DoDeleteEntryL [aIndex=%d logId=%d StreamId=%d]", |
678 LOGGSMU4("CSARStore::DoDeleteEntryL [aIndex=%d logId=%d StreamId=%d]", |
682 aIndex, entry.LogServerId(), entry.DataStreamId().Value()); |
679 aIndex, entry.LogServerId(), entry.DataStreamId().Value()); |
683 #endif // _SMS_LOGGING_ENABLED |
680 #endif // _SMS_LOGGING_ENABLED |
684 |
681 |
685 __ASSERT_DEBUG(iFileStore!=NULL,Panic(KGsmuPanicSARStoreNotOpen)); |
682 __ASSERT_DEBUG(iFileStore!=NULL,Panic(KGsmuPanicSARStoreNotOpen)); |
686 TRAP_IGNORE(iFileStore->DeleteL(iEntryArray[aIndex].DataStreamId())); |
683 TRAPD(err, iFileStore->DeleteL(iEntryArray[aIndex].DataStreamId())); |
687 iEntryArray[aIndex].SetIsDeleted(ETrue); // TODO - truth value should be set depending on ret |
684 if(err == KErrNone) |
|
685 { |
|
686 iEntryArray[aIndex].SetIsDeleted(ETrue); |
|
687 } |
688 } // CSARStore::DoDeleteEntryL |
688 } // CSARStore::DoDeleteEntryL |
689 |
689 |
690 |
690 |
691 /** |
691 /** |
692 * internalize - read from the file store into RAM |
692 * internalize - read from the file store into RAM |
788 stream << iEntryArray[i]; |
788 stream << iEntryArray[i]; |
789 } |
789 } |
790 } |
790 } |
791 |
791 |
792 stream << iExtraStreamId; |
792 stream << iExtraStreamId; |
793 stream.CommitL(); // TODO - keep this in your head |
793 stream.CommitL(); |
794 CleanupStack::PopAndDestroy(&stream); |
794 CleanupStack::PopAndDestroy(&stream); |
795 } // CSARStore::ExternalizeEntryArrayL |
795 } // CSARStore::ExternalizeEntryArrayL |
796 |
796 |
797 |
797 |
798 /** |
798 /** |