summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* v1.0.3 releasev1.0.3Daniel Drake2009-08-273-3/+12
|
* Darwin: 64-bit type fixesToby Peterson2009-08-231-2/+3
|
* Darwin: fix crash when reading descriptors after closeNathan Hjelm2009-08-231-0/+3
| | | | | Fix a crash which occurs if the user does the following sequence on a device: open, close, get_configuration_descriptor.
* move bug info to bug trackerDaniel Drake2009-08-012-11/+1
| | | | | Protection needed: http://www.libusb.org/ticket/4 Losing data: fixed in previous commit
* Linux: try harder not to lose any dataDaniel Drake2009-07-092-11/+91
| | | | | We would previously lose any data that was present on a cancelled URB. Work harder to make sure this doesn't happen.
* Add libusb_get_max_iso_packet_size()Daniel Drake2009-06-282-27/+101
| | | | | | | | | As pointed out by Dennis Muhlestein, libusb_get_max_packet_size() doesn't really do what the documentation might suggest because it does not consider the number of transaction opportunities per microframe. Add a new function to do what is useful for isochronous I/O.
* Linux: fix sending of zero length bulk packetsDaniel Drake2009-06-201-1/+5
| | | | | Note that there are is a kernel bug preventing this from working properly at the moment, even after this fix.
* Darwin: Don't cancel transfers on timeoutNathan Hjelm2009-06-192-1/+9
| | | | ...because the OS does this for us.
* Don't terminate enums with commasDaniel Drake2009-06-141-12/+12
| | | | | g++ -pedantic doesn't like this Reported by Eberhard Mattes
* v1.0.2 releasev1.0.2Daniel Drake2009-06-133-1/+6
|
* Linux: fix config descriptor parsing on big-endian systemsDaniel Drake2009-06-102-2/+8
| | | | | | | Multi-byte fields in the configuration descriptors that come back from usbfs are always in bus endian format. Thanks to Joe Jezak for help investigating and fixing this.
* Darwin: improve handling of disconnected devicesNathan Hjelm2009-06-071-25/+53
|
* Darwin: fix parsing of config descriptorsNathan Hjelm2009-06-071-16/+43
| | | | | This was a confusion between configuration numbers and zero-based configuration indexes.
* Eliminate -Wsign-compare compiler warningsDaniel Drake2009-06-071-4/+22
| | | | | | This was due to an API inconsistency which can be safely worked around. Hopefully we'll remember to fix the API next time we come to break things.
* Make synchronous transfer APIs robust against signal interruptionDavid Moore2009-05-291-0/+4
| | | | | | | | | | | | libusb_control_transfer and libusb_bulk_transfer are designed to be synchronous such that control is not returned until the transfer definitively succeeds or fails. That assumption is violated if a signal interrupts these functions because there is no way for the application to continue waiting for the transfer without resubmitting it. This patch changes these synchronous APIs so they do not abort in the case of a signal interruption. Signed-off-by: David Moore <dcm@acm.org>
* pre-gcc-3.4 compatibilityAlex Vatchenko2009-05-283-3/+22
| | | | | The -fvisibility and -Wno-pointer-sign options are not available on old GCC versions.
* Fix memory leak in config descriptor parsingDaniel Drake2009-05-261-0/+2
| | | | Pointed out by Martin Koegler.
* Update AUTHORSDaniel Drake2009-05-121-0/+3
|
* v1.0.1 releasev1.0.1Daniel Drake2009-05-122-1/+5
|
* Add BUGS fileDaniel Drake2009-05-122-1/+11
| | | | Probably missed a couple of outstanding issues
* Darwin: get_config_descriptor bugfixesNathan Hjelm2009-03-221-5/+23
|
* Fix compilation of Darwin backendDaniel Drake2009-02-251-2/+2
| | | | My fault. Reported by ihryamzik@gmail.com
* Darwin backendNathan Hjelm2009-02-168-3/+1637
|
* Make endianness macros endian-independentNathan Hjelm2009-02-161-14/+13
| | | | | Implementation suggested by David Moore. Needed for proper universal code support on Darwin.
* Abstract clock reading into OS layerNathan Hjelm2009-02-163-4/+33
| | | | | | This will differ on Linux and Darwin, at least. [dsd: minor style tweaks]
* Fix endianness in device descriptorsDaniel Drake2009-02-161-5/+5
| | | | Pointed out by Nathan Hjelm.
* Only link with librt on LinuxNathan Hjelm2009-02-162-1/+1
| | | | [dsd: tweak configure.ac change]
* API docs: describe libusb_transfer_cb_fn typeHans Ulrich Niedermann2009-02-011-0/+9
| | | | | | | | Add some text describing the libusb_transfer_cb_fn function type with the semantics I have gathered from reading other parts of the API docs, referring to the proper section for more details. [dsd: tweaked the description slightly]
* Make empty array in struct compatible with C99Hans Ulrich Niedermann2009-02-011-1/+7
| | | | | | | | If the compiler is known to be running in C99 mode, use "flexible array members" ("foo[]"). If the compiler is running in any other mode, continue using the non-standard but widely common "foo[0]" syntax.
* Avoid signedness errors in API docs example codeHans Ulrich Niedermann2009-01-311-2/+2
|
* Decrement poll() result when internal pipe has been handledDaniel Drake2009-01-171-0/+1
| | | | | | When we receive data on the internal control pipe, we need to correctly decrement the number of ready file descriptors before passing on the remaining work to the OS implementation.
* Prevent transfer from being submitted twice or improperly canceledDavid Moore2009-01-122-11/+35
| | | | | | | | | | This ensures that tpriv->urbs and tpriv->iso_urbs are always set to NULL whenever a transfer is not submitted. In this way, submit_*_transfer() and cancel_*_transfer() can error check to ensure that the transfer is in the correct state to be either submitted or canceled, preventing potential memory leaks or double frees. Signed-off-by: David Moore <dcm@acm.org>
* Linux: Fix race condition in cancel_bulk_transfer()David Moore2009-01-101-98/+38
| | | | | | | | | | | | | | | | | | | | | | | This fixes a race condition in cancel_bulk_transfer(). In the old version, awaiting_reap and awaiting_discard are incremented in cancel_bulk_transfer() and decremented in handle_bulk_completion(). However, since these events may take place in two different threads, these variables may reach zero before all URBs have been canceled, triggered spurious callbacks and duplicate frees. This changes the logic to use a single variable "num_retired" to replace both awaiting_reap and awaiting_discard. num_retired is incremented only in handle_bulk_completion() and thus there is no race. The handler will know that all URBs have been canceled when num_retired becomes equal to num_urbs. This change also simplifies a great deal of the logic in both functions and is a net reduction in the amount of code. Note that some variables such as "reap_action" probably need to still be protected by a mutex, and this patch does not address that issue. Signed-off-by: David Moore <dcm@acm.org>
* v1.0.0 releasev1.0.0Daniel Drake2008-12-132-1/+4
| | | | It's here!
* EOL-whitespace fixesMikhail Gusarov2008-12-132-14/+14
| | | | Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.ent>
* Linux: fix reading of active configurationDaniel Drake2008-12-091-1/+1
| | | | | Shannon Chuang pointed out that we only read 1 byte into an uninitialized integer, and then return the whole thing.
* Fix double free in descriptor parsing error pathDaniel Drake2008-12-091-0/+1
| | | | Pointed out by Shannon Chuang.
* Improvements to multi-threaded I/O systemDaniel Drake2008-11-212-4/+138
| | | | | | Documentation brushed up, and I realised that another function is needed for tight event handling loops -- they must be able to check if an open/close operation is trying to interrupt it.
* SourceForge website upload system changedDaniel Drake2008-11-211-1/+1
|
* v0.9.4 releasev0.9.4Daniel Drake2008-11-213-1/+8
|
* Pause event handling while opening and closing devicesDaniel Drake2008-11-213-37/+205
| | | | | | | | | | | | | | | Ludovic Rousseau found that crashes often occur if you close a device while another thread is doing event handling. Fix this by adding an internal control pipe, which the close routines use to interrupt the event handler and obtain the event handling lock, ensuring that no other thread is handling events while the device is closed. After the close completes, it signals all the event handlers to start up again using the usual mechanism. Also modified libusb_open() to do a similar thing, so that event handlers are interrupted in order to realise that a new poll fd has appeared.
* Add libusb_attach_kernel_driver()Bastien Nocera2008-11-034-0/+76
| | | | | | Add support for re-attaching a driver to a device under Linux. [dsd: fixed handling of return value, and added LIBUSB_ERROR_BUSY case]
* Linux: handle low-level transfer errorsDaniel Drake2008-11-021-11/+40
| | | | Handle more URB error status codes, thanks to Lou and Alan Stern.
* Support for out-of-tree buildingAurelien Jarno2008-11-023-4/+4
| | | | | | | Contrary to libusb 0.1, libusb 1.0 does not support out-of-tree building for the documentation part. This patch fixes that by using a doxygen.cfg.in file, which contains @top_srcdir@ to refer to the location of the libusb source code.
* Document the logging styleDaniel Drake2008-11-021-0/+11
| | | | Suggested by Lou.
* Async I/O documentation touchupsDaniel Drake2008-08-272-6/+18
|
* Doc: fix typo in events lock sectionDaniel Drake2008-08-271-1/+1
|
* v0.9.3 releasev0.9.3Daniel Drake2008-08-232-1/+4
|
* Reset internal transfer flags on submitDaniel Drake2008-08-231-0/+1
| | | | | | This fixes a problem pointed out by Lou, where resubmitting a transfer that previously timed out never timed out again, as if the timeout had been set to 0.
* Add libusb_get_configuration prototypeDaniel Drake2008-08-101-0/+1
| | | | Pointed out by Lou