Tim,
  Thanks for the info.  I will add it to my list of things to look into and
fix the next time I am updating the code.


        Brian Weischedel          bwei...@us.ibm.com




                                                                       
  From:       Tim Noell <tno...@gmail.com>                             
                                                                       
  To:         javax-usb-devel@lists.sourceforge.net                    
                                                                       
  Date:       10/08/2010 04:22 PM                                      
                                                                       
  Subject:    [javax-usb-devel] Possible Bug in javax-usb-ri-linux_1.0.2 on     
32-bit architectures
                                                                       





Hi javax-usb-devel:
I just recently upgraded to 1.0.2 and found a problem ...

Target is 32-bit architecture.

In src/com/ibm/jusb/os/linux/LinuxPipeRequest.java  line 123
the type of urbAddress is a java long (64-bit)

In jni/JavaxUsbPipeRequest.c, line 76, where setUrbAddress() is called, the
urb is a 32-bit pointer.
If it is not cast to jlong, then later when we call getUrbAddress, we get
garbage.

Here is a changeset that add the jong cast and fixes it for 32-bit
architectures:
                log( LOG_XFER_REQUEST, "Submitted URB" );
-               CheckedCallVoidMethod( env, linuxPipeRequest,
setUrbAddress, urb );
+               CheckedCallVoidMethod( env, linuxPipeRequest,
setUrbAddress, (jlong)urb );

Probably worked just fine on 64-bit, and maybe was not regressed on
32-bit ???

Anyway, FYI,
T.

--
// "Only dead fish go with the flow"
------------------------------------------------------------------------------

Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
javax-usb-devel mailing list
javax-usb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel

<<inline: graycol.gif>>

<<inline: ecblank.gif>>

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
javax-usb-devel mailing list
javax-usb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/javax-usb-devel

Reply via email to