[Libusbx-devel] [libusbx] Memory leak due to unhandled hotplug left event on libusb_exit() (#150)

2013-09-26 Thread Matthias Bolte
I noticed a memory leak after updating to libusb 1.0.16 which added hotplug support, the leak is also present in the current git version. Basically I see libusb_device object leaking and tracked this down an unhandled hotplug left event that was created between my last call to

[Libusbx-devel] [libusbx] Windows: Avoid potential mismatch in transfer error reporting (#151)

2013-10-01 Thread Matthias Bolte
The default case in windows_transfer_callback() calls windows_error_str(0) which will convert the error code returned by GetLastError() to a string. This currently works because windows_transfer_callback() is either called with io_result set to NO_ERROR or io_result set to GetLastError(). If

Re: [Libusbx-devel] memory leaks

2013-10-02 Thread Matthias Bolte
cb_response_in was called. But as you don't neither of this the transfer_response_in object leaks. -- Matthias Bolte http://photron.blogspot.com -- October Webinars: Code for Performance Free Intel webinars can help you

Re: [Libusbx-devel] how to compile with gcc in linux

2013-10-09 Thread Matthias Bolte
it. -- Matthias Bolte http://photron.blogspot.com -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get

Re: [Libusbx-devel] [libusbx] Windows: hotplug/unplug support (#9)

2013-10-11 Thread Matthias Bolte
You could use GetClassInfoExA to check if the window class already exist any only register it if it's not existing yet. --- Reply to this email directly or view it on GitHub:

Re: [Libusbx-devel] [libusbx] Windows: hotplug/unplug support (#9)

2013-10-11 Thread Matthias Bolte
Well, using UnregisterClassA is dangerous because it requires that the hotplug thread always exits correctly and that you are not starting a new hotplug thread before the old one has ended. And this is where the problems are: In the error path of windows_init you're just terminated the hotplug

[Libusbx-devel] [libusbx] darwin: Fix format of 64-bit sessionIDs in log messages (#153)

2013-10-14 Thread Matthias Bolte
The sessionID value is 64-bit, so print it as 64-bit value and don#39;t truncate it to 32-bit. You can merge this Pull Request by running: git pull https://github.com/photron/libusbx darwin-fix-1 Or you can view, comment on it, or merge it online at:

Re: [Libusbx-devel] [libusbx] darwin: Fix format of 64-bit sessionIDs in log messages (#153)

2013-10-14 Thread Matthias Bolte
I also noticed that the 64-bit sessionID gets stored in the unsigned long session_data parameter of the libusb_device struct. First I thought this would be a problem because the 64-bit value could get truncated, but as recent Macs are all 64-bit and LP64 is in place there, unsigned long is also

Re: [Libusbx-devel] [libusbx] Memory leak due to unhandled hotplug left event on libusb_exit() (#150)

2013-10-17 Thread Matthias Bolte
Yes, these two patches fix the problem, thanks. --- Reply to this email directly or view it on GitHub: https://github.com/libusbx/libusbx/issues/150#issuecomment-26495583-- October Webinars: Code for Performance Free

[Libusbx-devel] [libusbx] Windows: Fix error formatting for SetupAPI errors (#166)

2013-12-18 Thread Matthias Bolte
The [Guidelines for Using SetupAPI](http://msdn.microsoft.com/en-us/library/windows/hardware/ff545011.aspx) state that if a SetupAPI function fails then the return value of GetLastError() must be converted to a HRESULT value with the HRESULT_FROM_SETUPAPI macro before passing it to

Re: [Libusbx-devel] Problem with transfers in parallel

2013-12-20 Thread Matthias Bolte
I already had a poll based event loop in my application. -- Matthias Bolte http://photron.blogspot.com -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture

Re: [Libusbx-devel] Problem with transfers in parallel

2013-12-23 Thread Matthias Bolte
description. -- Matthias Bolte http://photron.blogspot.com -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects

Re: [Libusbx-devel] Getting unsupported API call for 'open' on Windows 8.1 libusb

2014-07-31 Thread Matthias Bolte
? -- Matthias Bolte http://photron.blogspot.com -- Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps

Re: [Libusbx-devel] Getting unsupported API call for 'open' on Windows 8.1 libusb

2014-08-04 Thread Matthias Bolte
, desc.idProduct); if( desc.idVendor == VENDOR_ID (desc.idProduct == PRODUCT_ID) { //printf(device found: class=0x%x\n, desc.bDeviceClass); return 1; } return 0; } On Thu, Jul 31, 2014 at 3:42 AM, Matthias Bolte matthias.bo...@googlemail.com wrote: 2014-07-29 23:28 GMT+02