Re: [Barry-devel] patch for probe.cc - working with 2.6.14 and later.
Status: Beta
Brought to you by:
ndprojects
From: Chris F. <cd...@fo...> - 2006-06-10 00:49:53
|
On Fri, Jun 09, 2006 at 08:19:05PM -0400, Ron Gage wrote: > Chris had asked me to send him this - and to start posting to the > mailing list so others can laugh at me too! :) Thanks for the patch, and for joining the list! > Anyhow, here is what I did to probe.cc to get it to work with kernels > 2.6.14 and higher (and probably some earlier ones too)... > > diff -u probe.cc probe.cc~ > --- probe.cc 2006-06-08 19:29:05.000000000 -0400 > +++ probe.cc~ 2006-06-08 19:29:05.000000000 -0400 > @@ -110,10 +110,11 @@ > dev.Reset(); > sleep(5); > > + Interface iface(dev, BLACKBERRY_INTERFACE); > + > if( !dev.SetConfiguration(BLACKBERRY_CONFIGURATION) ) > throw BError(dev.GetLastError(), > "Probe: SetConfiguration failed"); > - Interface iface(dev, BLACKBERRY_INTERFACE); > > Data data; > Intro(0, dev, data); > (If this was agaisnt version 0.0.1, the patch is backwards. Just for reference, diff usage is "diff -u oldfile newfile" It's a very common error.) Fortunately, this is in CVS, but unfortunately I haven't released it yet, so those still working with 0.0.1, this patch is for you. I see the problem is also in controller.cc, as you mentioned earlier Ron. Can you try checking out the CVS tree, and then applying this patch and let me know if this fixes it for 2.6.14? Thanks Ron, - Chris Index: controller.h =================================================================== RCS file: /home/cvs/NetDirect/barry/src/controller.h,v retrieving revision 1.7 diff -u -r1.7 controller.h --- controller.h 1 Apr 2006 01:19:29 -0000 1.7 +++ controller.h 10 Jun 2006 00:47:36 -0000 @@ -70,7 +70,7 @@ private: Usb::Device m_dev; - Usb::Interface m_iface; + Usb::Interface *m_iface; uint32_t m_pin; Socket m_socket; Index: controller.cc =================================================================== RCS file: /home/cvs/NetDirect/barry/src/controller.cc,v retrieving revision 1.13 diff -u -r1.13 controller.cc --- controller.cc 1 Apr 2006 01:22:51 -0000 1.13 +++ controller.cc 10 Jun 2006 00:47:38 -0000 @@ -48,7 +48,6 @@ /// Controller::Controller(const ProbeResult &device) : m_dev(device.m_dev), - m_iface(m_dev, BLACKBERRY_INTERFACE), m_pin(device.m_pin), m_socket(m_dev, device.m_ep.write, device.m_ep.read), m_mode(Unspecified) @@ -56,10 +55,13 @@ if( !m_dev.SetConfiguration(BLACKBERRY_CONFIGURATION) ) throw BError(m_dev.GetLastError(), "Controller: SetConfiguration failed"); + + m_iface = new Usb::Interface(m_dev, BLACKBERRY_INTERFACE); } Controller::~Controller() { + delete m_iface; } |