Setup of default mail client fails and no error displayed in MAPI_NEW_DIR_TRUNK

VERIFIED FIXED

Status

MailNews Core
Simple MAPI
VERIFIED FIXED
17 years ago
10 years ago

People

(Reporter: Rajiv Dayal, Assigned: Rajiv Dayal)

Tracking

Trunk
x86
Windows NT

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Assignee)

Description

17 years ago
Setting up of the Windows registry for making Mail as the system default fails
as well as no error message is displayed with the MAPI_NEW_DIR_TRUNK.
(Assignee)

Comment 1

17 years ago
This is happening becuase the resources are grouped in a different way for MAPI
on the trunk, the mapi resources go into the messenger-mapi dir and not the
messenger dir as was the case in 094 branch. Also the MakeStringBundle did not
return the nsIBundle obj correctly. Hence the string retrieval failed and thus
setDefaultMailClient function failed. 

Please find below the patch with the fix with additional changes for the jar.mn
and makefile.mak files. The patch is created by doing a diff with the
MAPI_NEW_DIR_TRUNK and thus it has these additional changes for jar.m and
makefile.win which however are already in the trunk.

(Assignee)

Comment 2

17 years ago
Created attachment 62796 [details] [diff] [review]
fix for setting mail as default and display error msg if it fails

Hi Sean and Seth,
Can u please r and sr the patch.
thanks, - Rajiv.
(Assignee)

Updated

17 years ago
Attachment #62796 - Attachment is obsolete: true
(Assignee)

Comment 3

17 years ago
Created attachment 62802 [details] [diff] [review]
fix for the bug

please ignore the above patch, had a debug define and missing xul file changes.


Please use this patch for review. thanks, - rajiv.

Comment 4

17 years ago
Comment on attachment 62802 [details] [diff] [review]
fix for the bug

r=ssu
Attachment #62802 - Flags: review+
(Assignee)

Comment 5

17 years ago
Thanks Sean.
Seth, can u please sr this. thanks, - Rajiv.
1) why does MakeMapiStringBundle() return NS_OK when it doesn't create the 
bundle?

2)

+    *aMapiStringBundle = m_mapiStringBundle ;
+    NS_ADDREF(*aMapiStringBundle);

as dmose enlightened me:

this can be 

+ NS_ADDREF(*aMapiStringBundle = m_mapiStringBundle);

3)

+ if (NS_FAILED(rv) || !bundle) return NS_ERROR_FAILURE;

a style nit that waterson suggests:

if (NS_FAILED(rv))
  return NS_ERROR_FAILURE;

this way, you could set a breakpoint on the return in the debugger.
(Assignee)

Comment 7

17 years ago
Created attachment 62897 [details] [diff] [review]
updated patch.

1) MakeMapiStringBundle never returns NS_OK if it cannot get the bundle, will
remove the check for (!bundle) from :
if (NS_FAILED(rv) || !bundle) return NS_ERROR_FAILURE;

2) done

3) doing this will make it inconsistent with all the remaining MAPI code.
Comment on attachment 62897 [details] [diff] [review]
updated patch.

sr=sspitzer
Attachment #62897 - Flags: superreview+
(Assignee)

Comment 9

17 years ago
checked into the trunk.
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 10

17 years ago
verified on mozilla & netscape trunk builds 2002022703
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.