The default bug view has changed. See this FAQ.

improve palmsync error checking and logging, and feedback to the hotsync manager

RESOLVED FIXED

Status

MailNews Core Graveyard
Palm Sync
RESOLVED FIXED
10 years ago
8 years ago

People

(Reporter: wsmwk, Assigned: wsmwk)

Tracking

({fixed1.8.1.5})

Trunk
x86
Windows XP
fixed1.8.1.5

Details

Attachments

(2 attachments)

Follow up to bug Bug 183722.  Areas for improvement include ensuring all return codes are provided and returned, logging of additional events to the optional conduit log, and adding feedback to the the hotsync manager during conduit operation.  

David, I don't know winapi threading. CMozABConduitSync::PerformFastSync() looks to me like it always returns success (ends with "return 0"). Does this need to be revised to properly propagate the return code so it can be evaluated?
http://lxr.mozilla.org/mozilla/source/mailnews/extensions/palmsync/conduit/MozABConduitSync.cpp#621
(Assignee)

Comment 1

10 years ago
examples for improvement with conduit log 

1. if name='' then the AB should not probably not be synced. Not sure yet about the '-1' entries.  Example log...

Getting moz AB List ... Done getting moz AB List. 
Moz AB[0] category index/synced=-1/0, name='', url='moz-abmdbdirectory://impab-4.mab'
...
Moz AB[5] category index/synced=-1/0, name= '', url= 'moz-abmdbdirectory://impab-11.mab'
...


2. after sync hits 15 palm categories and attempts the 16th it should kick an entry in the HSM log. The conduit log entry looks like this.

Moz AB[15] category index = 5, name = '' doesn't exist on Palm so needs to be added to palm
  Creating new Palm AB with 1 record(s) ... Done creating new Palm AB, new category index=-1. retval=-2000.
Creating new Palm AB failed. retval=-2000.
(Assignee)

Comment 2

10 years ago
Created attachment 263276 [details] [diff] [review]
fix retun code in PerformFastSync v1

from comment comment #0, CMozABConduitSync::PerformFastSync() always returns success after finishing CreateThread to run DoFastSync - not good when the return code of the most used sync method (PerformFastSync) is untrustworthy. Also add missing log entry in DoFastSync for GetPCABList return code

references:
http://www.codeguru.com/cpp/misc/misc/threadsprocesses/article.php/c3791/
http://msdn2.microsoft.com/en-us/library/ms683190.aspx
http://msdn2.microsoft.com/en-us/library/ms682512.aspx

note: the thread handle is not closed
Assignee: bienvenu → vseerror
Status: NEW → ASSIGNED
Attachment #263276 - Flags: review?(bienvenu)
(Assignee)

Comment 3

10 years ago
Comment on attachment 263276 [details] [diff] [review]
fix retun code in PerformFastSync v1

(In reply to comment #2)
> Created an attachment (id=263276) [details]
> fix retun code in PerformFastSync v1

David, neil commented "the code looks vaguely reasonable".  Will also need your checkin magic
Attachment #263276 - Flags: superreview?(bienvenu)
(Assignee)

Comment 4

10 years ago
?
(Assignee)

Comment 5

10 years ago
checkin?

Comment 6

10 years ago
I can't do this until Monday...I'll try to remember to do it then. Please feel free to ping me again then if I forget.

Comment 7

10 years ago
Comment on attachment 263276 [details] [diff] [review]
fix retun code in PerformFastSync v1

fixed on trunk, thx, Wayne
Attachment #263276 - Flags: superreview?(bienvenu)
Attachment #263276 - Flags: superreview+
Attachment #263276 - Flags: review?(bienvenu)
Attachment #263276 - Flags: review+
(Assignee)

Comment 8

10 years ago
(In reply to comment #7)
> (From update of attachment 263276 [details] [diff] [review])
> fixed on trunk, thx, Wayne

David this worked OK on trunk. yay!

please checkin on branch
(Assignee)

Comment 9

10 years ago
Created attachment 266952 [details] [diff] [review]
fix retun code in PerformFastSync v1 [1.8 branch]

branch version of attachment 263276 [details] [diff] [review] - line # changes only, no code change
Attachment #266952 - Flags: superreview?(bienvenu)
Attachment #266952 - Flags: review?(bienvenu)

Comment 10

10 years ago
fixed on trunk and branch, thx, Wayne!
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Keywords: fixed1.8.1.5
Resolution: --- → FIXED

Comment 11

9 years ago
Comment on attachment 266952 [details] [diff] [review]
fix retun code in PerformFastSync v1 [1.8 branch]

clearing request - this looks like it's on the 1.8.1 branch already.
Attachment #266952 - Flags: superreview?(bienvenu)
Attachment #266952 - Flags: review?(bienvenu)
Product: Core → MailNews Core

Updated

8 years ago
Component: Palm Sync → Palm Sync
Product: MailNews Core → MailNews Core Graveyard
You need to log in before you can comment on or make changes to this bug.