Closed Bug 132474 Opened 24 years ago Closed 24 years ago

Bad MORK fileopen implementation for OS/2

Categories

(MailNews Core :: Database, defect)

x86
OS/2
defect
Not set
blocker

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: abwillis1, Assigned: mkaply)

References

Details

Attachments

(1 file, 3 obsolete files)

I have been having a problem here since 0.9.7 with my inbox only working once after a migration then it comeseup blank. I found that if I delete the inbox.msf file it would load clean once then not work the next time. I was able to setup a script to delete the inbox.msf on every launch to get around the problem. I have this on 2 seperate systems here. I also made a backup directory of my inbox(inbox2) and it works everytime. I then deleted the inbox and inbox.msf and copied the inbox2 and inbox2.msf over to inbox and inbox.msf respectively and did the same in netscape to let it get converted. Same problem but always the inbox2 works. I have created inbox2 by coping the files and by creating a folder and coping the files over inside warpzilla. When the inbox is empty the default text for the inbox is not whatever it should be - mine should have been Western but kept on showing as Arabic. Also the inbox when it is correct has only one tab in properties showing Western. When it is empty the properties has 3 tabs, the second like that of a newsgroup the third is sharing. The closest bug I found was 48955 but not sure if it is the same or not. Andy
Patch coming up.
Assignee: sspitzer → bienvenu
Severity: normal → blocker
Status: UNCONFIRMED → NEW
Component: Profile Migration → Mail Database
Ever confirmed: true
QA Contact: esther → gayatri
Summary: Inbox empty with wrong properties → Bad MORK fileopen implementation for OS/2
Attached patch Custom MORK_FILEOPEN for OS/2 (obsolete) — — Splinter Review
Mork was making the BAD assumption that two subsequent fopens on a file succeed all the time. I had to rewrite it for OS/2. This involved one XP thing. Mork already had #defines in morkConfig.h that mapped the file APIs to platform stuff. For some reason they left out fopen. I fixed that. I also changed the #defines in morkConfig.h - XP_WIN was being defined if XP_PC was set which is wrong. This was causing XP_WIN to be defined for XP_OS2. Then I implemented XP_FILEOPEN for OS/2 using sopen and fdopen. Works like a charm. This is CRUCIAL for OS/2. It fixes mail.
that all makes sense, but why add duplicates of FSEEK, FTELL, and FFLUSH? Oh well, I guess it doesn't really matter - thanks for fixing this.
Comment on attachment 75474 [details] [diff] [review] Custom MORK_FILEOPEN for OS/2 r=bienvenu
Attachment #75474 - Flags: review+
Attached patch New diff (obsolete) — — Splinter Review
You are right. I should just do the OS/2 within the bigger #ifdef. Originally I was going to reimplement them all as OS/2 APIs until I saw I could use sopen and fopen. Can I get an r= on this? I really want to get this in.
Attachment #75474 - Attachment is obsolete: true
Comment on attachment 75479 [details] [diff] [review] New diff r=bienvenu (if you want that to be an sr, that's fine with me, either way). I don't care who the other reviewer is.
Attachment #75479 - Flags: review+
*** Bug 127493 has been marked as a duplicate of this bug. ***
Attached patch Last patch I swear (obsolete) — — Splinter Review
I thought things through over dinner and I don't think the implementation of mork_fileopen belongs in a header, given that at some point, MORK_FILEOPEN could be used in some other C file. morkConfig.cpp seems the perfect place for this function. This is essentially the same diff with things moved to morkConfig. BTW, I'll take your review as a superreview and get one of my team to review it. Thanks for all the help. Sorry for all the patches :)
Attachment #75479 - Attachment is obsolete: true
-> Michael, thx for fixing this.
Assignee: bienvenu → mkaply
sr=sspitzer, once it has r=bienvenu
Comment on attachment 75525 [details] [diff] [review] Last patch I swear per note from sspitzer, bienvenu had reviewed it (last patch isn't any code change from the second, just refactoring.
Attachment #75525 - Flags: superreview+
Attachment #75525 - Flags: review+
Comment on attachment 75525 [details] [diff] [review] Last patch I swear a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Attachment #75525 - Flags: approval+
Fix checked in
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
*** Bug 132955 has been marked as a duplicate of this bug. ***
Reopening bug: Patch is not complete. We need to specify the pmode argument to sopen() when passing in the O_CREAT flag.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment on attachment 76080 [details] [diff] [review] pmode patch r=bienvenu
Attachment #76080 - Flags: review+
Attachment #75525 - Attachment is obsolete: true
New fix already went in as bustage fix.
Status: REOPENED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
marking verified. Everyone seems happy with mail now.
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: