Closed Bug 238518 Opened 20 years ago Closed 20 years ago

verify offline store offset is correct when reading offline message

Categories

(SeaMonkey :: MailNews: Backend, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Bienvenu, Assigned: Bienvenu)

Details

Attachments

(1 file, 1 obsolete file)

When an offline store gets out of sync with the .msf file, such that the msg hdr
offset into the offline store in the msg db is wrong, we should detect this when
the user tries to read the message, and clear the offline flag on the msg hdr,
so if the user is online, we'll fall back to fetching the message from the
server, and the next time the user does an offline sync, the message will be
re-downloaded.
Attached patch proposed fix (obsolete) — Splinter Review
try to read the first five bytes of the offline message - if not "From ", we
know we're corrupted, so clear the flag that says we have the message offline,
and return an error. This will fix both news and imap.
Attachment #144664 - Flags: superreview?(mscott)
Attachment #144664 - Flags: superreview?(mscott) → superreview+
Attached patch better fixSplinter Review
in the previous code, the rv was getting shadowed, so we were still returning
success, so we didn't try to load the message from the server again.
Attachment #144664 - Attachment is obsolete: true
Comment on attachment 144692 [details] [diff] [review]
better fix

need to remove the decl of nsresult in the code above my change so that we
return the error correctly.
Attachment #144692 - Flags: superreview?(mscott)
Attachment #144692 - Flags: superreview?(mscott) → superreview+
Comment on attachment 144692 [details] [diff] [review]
better fix

this is a fairly safe fix that helps repair corruption of offline imap and news
stores.
Attachment #144692 - Flags: approval1.7?
Comment on attachment 144692 [details] [diff] [review]
better fix

a=chofmann for 1.7
Attachment #144692 - Flags: approval1.7? → approval1.7+
fix checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: