Re: LGDM Phone patch

Nathan Hjelm <[email protected]>
Newsgroups gmane.comp.mobile.bitpim.devel
Message-ID <[email protected]>
On Jun 25, 2007, at 9:37 PM, Joe Pham wrote:

> I finally got some time to look at the patch and I have a few
> suggestions:
>
> 1. Need to determine when a phone dropped off DM and needs re-enter
> DM, vs when it failed to enter DM in the first place (which should be
> ignored rather than retry).

I am unsure a way exists to determine what the DM state of the phone  
is except by trying a file operation and detecting a failure. I will  
look into other means of detecting DM but I do not expect another  
method will be found (LGD simply sets DM before any file operation  
regardless of phone state).

A failure to enter DM should raise an exception (in DMv5).

> 2. Your wrappers for file ops need to be done per instance vs per
> class basis.  (Your scheme of using a class variable does not seem to
> work anyway).

Can you explain what you mean by the class variable scheme not  
working? I have tested the code with both a VX-8700 and VX-8600 (v3).

I am unclear on what you mean by per instance basis vs per class  
basis? The code *should* already be working on a per instance basis.

> 3. Inside your wrappers, just check if DM has been achieved, if not
> then try it rather than catching for BrewAccessDeniedException.

How you suggest is how I had previously handled entering DM. I  
changed it 1) to avoid messing with DM when it is not needed (the  
phone may already be in DM or may not need it for the particular  
operation) and 2) to simply catch when the phone has left DM.


Thanks for the suggestions! I look forward to providing an improved  
patch :)

-Nathan Hjelm

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.