Re: [Libusbx-devel] USB port number

2012-05-08 Thread Peter Stuge
Janko Kolar wrote: > I would like to determine to which usb port particular device is > attached. I can see this information with UsbView from Microsoft > or UsbDeview program. Please clarify exactly which information you want, and how you want to use it? UsbView and UsbDeview are unfamiliar to me

[Libusbx-devel] libusbx v1.0.11 released

2012-05-08 Thread Pete Batard
All, Please be informed that libusbx v1.0.11 has just been released. This is mostly a bugfix release aimed at fixing a critical regression that was introduced with v1.0.10, as well as a potential deadlock condition, for the Windows platform. If you are running libusbx on a Windows platform, yo

Re: [Libusbx-devel] Minor compiler warning: enumeration value not handled in switch

2012-05-08 Thread Pete Batard
On 2012.05.08 19:29, Ludovic Rousseau wrote: > I suggest to NOT change any CFLAGS or other compilation option > selected by a developer/user. > > In my ~/.bash_profile file I have my own definition of CFLAGS and > CXXFLAGS but that is my choice. > > The good idea would be to use a high level of war

Re: [Libusbx-devel] minor compiler warning: warning: comparison between signed and unsigned

2012-05-08 Thread Pete Batard
On 2012.05.08 19:45, Ludovic Rousseau wrote: > Patch attached. > I tried to use the same commit message format as the other patches. Thanks. Acked and pushed. Regards, /Pete -- Live Security Virtual Conference Exclusive

[Libusbx-devel] minor compiler warning: warning: comparison between signed and unsigned

2012-05-08 Thread Ludovic Rousseau
os/darwin_usb.c: In function ‘submit_iso_transfer’: os/darwin_usb.c:1334: warning: comparison between signed and unsigned Patch attached. I tried to use the same commit message format as the other patches. --  Dr. Ludovic Rousseau 0001-Sync-type-of-num_iso_packets-fields.patch Description: Bin

Re: [Libusbx-devel] Minor compiler warning: enumeration value not handled in switch

2012-05-08 Thread Ludovic Rousseau
2012/5/8 Pete Batard : > On 2012.05.08 14:59, Ludovic Rousseau wrote: >> I use the compiler option -Wswitch-enum: > > Depending on whether we have cross platform support for that option, do > you or anybody else think it may be worth enabling it by default? I suggest to NOT change any CFLAGS or ot

Re: [Libusbx-devel] USB port number

2012-05-08 Thread Tim Roberts
Xiaofan Chen wrote: > On Sat, May 5, 2012 at 1:02 AM, Tim Roberts wrote: >> Janko Kolar wrote: >>> I am new to libusbx and I have one basic question >>> >>> I would like to determine to which usb port particular device is attached. >> Why? Of what possible use is this information? USB hubs are n

Re: [Libusbx-devel] Minor compiler warning: enumeration value not handled in switch

2012-05-08 Thread Pete Batard
On 2012.05.08 14:59, Ludovic Rousseau wrote: > I use the compiler option -Wswitch-enum: Depending on whether we have cross platform support for that option, do you or anybody else think it may be worth enabling it by default? > OK for LIBUSB_ERROR_IO > patch attached. Thanks. Now pushed. Regar

Re: [Libusbx-devel] Fwd: problems with libusb_get_string_descriptor()

2012-05-08 Thread Peter Stuge
Orin Eman wrote: > The point here is if a program crashes in libusb, libusb gets the > blame. Doesn't matter if it was a null pointer from the > application, crash in libusb, libusb gets blamed. At some point that may turn out to be a significant problem. A core design value of OpenUSB is to do

Re: [Libusbx-devel] Minor compiler warning: enumeration value not handled in switch

2012-05-08 Thread Ludovic Rousseau
2012/5/8 Pete Batard : > On 2012.05.08 12:16, Ludovic Rousseau wrote: >> I get these compiler warnings: >> >> sync.c: In function ‘libusb_control_transfer’: >> sync.c:122: warning: enumeration value ‘LIBUSB_TRANSFER_ERROR’ not >> handled in switch >> sync.c:122: warning: enumeration value ‘LIBUSB_T

Re: [Libusbx-devel] Minor compiler warning: enumeration value not handled in switch

2012-05-08 Thread Pete Batard
On 2012.05.08 12:16, Ludovic Rousseau wrote: > I get these compiler warnings: > > sync.c: In function ‘libusb_control_transfer’: > sync.c:122: warning: enumeration value ‘LIBUSB_TRANSFER_ERROR’ not > handled in switch > sync.c:122: warning: enumeration value ‘LIBUSB_TRANSFER_CANCELLED’ not > handle

[Libusbx-devel] Minor compiler warning: enumeration value not handled in switch

2012-05-08 Thread Ludovic Rousseau
Hello, I get these compiler warnings: sync.c: In function ‘libusb_control_transfer’: sync.c:122: warning: enumeration value ‘LIBUSB_TRANSFER_ERROR’ not handled in switch sync.c:122: warning: enumeration value ‘LIBUSB_TRANSFER_CANCELLED’ not handled in switch sync.c: In function ‘do_sync_bulk_tra

Re: [Libusbx-devel] [PATCH/RFC] logging timestamps v3

2012-05-08 Thread Pete Batard
On 2012.05.08 12:02, Pete Batard wrote: > Looks like we also could use a space between "[function call]" > and "" in the header. Disregard. Thunderbird ate the space when replying. Regards, /Pete -- Live Security Virtua

Re: [Libusbx-devel] [PATCH/RFC] logging timestamps v3

2012-05-08 Thread Pete Batard
On 2012.05.08 11:42, Xiaofan Chen wrote: > I downloaded your attached patch. Somehow both > "git am" and "patch -p1" failed. So I manually change > the file and indeed it seem to work fine under > OpenBSD Current. Thanks. OK. I generated the patch with git diff, but I'll make sure to go through a

[Libusbx-devel] Tickets to be closed with 1.0.11

2012-05-08 Thread Pete Batard
I'm currently having a look in Trac. The following are the tickets that I plan to close as fixed with the 1.0.11 release: o https://sourceforge.net/apps/trac/libusbx/ticket/13 Timestamping in log messages o https://sourceforge.net/apps/trac/libusbx/ticket/16 Enable support for Linux systems

Re: [Libusbx-devel] [PATCH/RFC] logging timestamps v3

2012-05-08 Thread Xiaofan Chen
On Tue, May 8, 2012 at 6:16 PM, Pete Batard wrote: > On 2012.05.08 11:07, Xiaofan Chen wrote: >> >> Martin's answer: >> "This is normal, you must use an OpenBSD -current in order >> to have real threads enable, until 5.1 OpenBSD only has >> userland threads." > > OK. If possible, can you try the a

Re: [Libusbx-devel] [PATCH/RFC] logging timestamps v2

2012-05-08 Thread Pete Batard
On 2012.05.08 11:08, Xiaofan Chen wrote: >>> Sean, maybe it would be an idea for the os dependent code to print a >>> thread "name" + id when creating a thread and debugging is enabled, >>> this way a user can easily find which thread-id is which thread >>> in the logs? >>> >> >> Maybe this is a go

Re: [Libusbx-devel] [PATCH/RFC] logging timestamps v3

2012-05-08 Thread Pete Batard
On 2012.05.08 11:07, Xiaofan Chen wrote: Martin's answer: "This is normal, you must use an OpenBSD -current in order to have real threads enable, until 5.1 OpenBSD only has userland threads." OK. If possible, can you try the attached patch on your platform and let me know whether you get a pro

Re: [Libusbx-devel] libusbx-1.0.11 RC1

2012-05-08 Thread Xiaofan Chen
On Tue, May 8, 2012 at 6:08 PM, Pete Batard wrote: > On 2012.05.08 01:10, Xiaofan Chen wrote: >> A few warnings under NetBSD 6.0 Beta. Other than that, it >> seems to work fine. >>    CC     libusb_1_0_la-openbsd_usb.lo >> os/openbsd_usb.c: In function '_sync_control_transfer': >> os/openbsd_usb.c

Re: [Libusbx-devel] [PATCH/RFC] logging timestamps v2

2012-05-08 Thread Xiaofan Chen
On Tue, May 8, 2012 at 10:29 AM, Xiaofan Chen wrote: > On Sat, May 5, 2012 at 3:18 PM, Hans de Goede wrote: libusbx is already calling pthread_setname_np() for the >>> thread it creates. >>> >>> But only for OS X I assume... >> >> Sean, maybe it would be an idea for the os dependent code to

Re: [Libusbx-devel] libusbx-1.0.11 RC1

2012-05-08 Thread Pete Batard
On 2012.05.08 01:10, Xiaofan Chen wrote: > A few warnings under NetBSD 6.0 Beta. Other than that, it > seems to work fine. >CC libusb_1_0_la-openbsd_usb.lo > os/openbsd_usb.c: In function '_sync_control_transfer': > os/openbsd_usb.c:638:2: warning: dereferencing type-punned pointer > will b

Re: [Libusbx-devel] libusbx-1.0.11 RC1

2012-05-08 Thread Pete Batard
On 2012.05.08 01:00, Xiaofan Chen wrote: >> What did you use to install your OpenBSD platform? > > It is the snapshot release, which is more recent > than 5.1 release. Aha! I think I'll keep testing with the old release for now, so that between the both of us, we have a slightly more representati

Re: [Libusbx-devel] [PATCH/RFC] logging timestamps v3

2012-05-08 Thread Xiaofan Chen
On Tue, May 8, 2012 at 1:20 PM, Xiaofan Chen wrote: > On Mon, May 7, 2012 at 11:16 PM, Pete Batard wrote: >> On 2012.05.07 15:47, Pete Batard wrote: >>> On 2012.05.07 14:40, Xiaofan Chen wrote: As per Matin (the author of the OpenBSD backend), you can use the getthrid() syscall that ret