summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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
* v0.9.2 releasev0.9.2Daniel Drake2008-07-192-1/+4
|
* Linux: fix sysfs directory handlingDaniel Drake2008-07-162-4/+9
| | | | | The length of the directory name varies, e.g. when you have nested hubs. Use dynamic allocation to be able to deal with any length of name.
* Linux: correct usage of MAX_PATHDavid Engraf2008-07-161-6/+6
| | | | | Thanks to clarification from Artem Egorkine, MAX_PATH already includes space for the trailing NULL.
* Linux: fix bulk/iso transfer double-cancellationDaniel Drake2008-07-081-0/+4
| | | | | | Reset counters to 0 so that it's possible to cancel a transfer twice without breaking things. Not sure that I want to support this properly, but this makes it work at least.
* v0.9.1 releasev0.9.1Daniel Drake2008-06-282-1/+6
|
* Add missing GET_CONTEXT()Daniel Drake2008-06-281-0/+1
|
* Linux: Compatibility with new sysfs descriptors fileDaniel Drake2008-06-282-83/+156
| | | | | As of 2.6.26, the descriptors file now includes all descriptors, not just the active one.
* Allow user data pointer to be passed through pollfd notification APIDaniel Drake2008-06-263-6/+16
|
* Introduce contexts to the APIDaniel Drake2008-06-2611-398/+606
| | | | | Suggested by David Zeuthen. This allows multiple libraries in the same process to independently use libusb without interfering.
* Revert "Temporary workaround for event handling serialization issue"Daniel Drake2008-06-241-15/+1
| | | | | | This reverts commit 2d3a1111caff40ebb87983c861ff548cdc9e5946. This was based on the assumption that dying threads would automatically release mutexes, which is not the case.
* Overflow handlingDaniel Drake2008-06-205-7/+82
|
* a fix for SIGSEGV in handle_bulk_completion()Artem Egorkine2008-06-172-1/+2
| | | | | | We cannot dereference tpriv after calling usbi_handle_transfer_cancellation() because that function may invoke the user-supplied callback which may free the transfer.
* Refine configuration selection againDaniel Drake2008-06-161-42/+72
| | | | | | At Alan Stern's suggestion, just offer the bare "set configuration" and "get configuration" functionality, and let applications worry about the specific race conditions and unusual situations.
* docs updateDaniel Drake2008-06-153-1/+22
| | | | Add a THANKS file, make copyright notices easily accessible, update TODO
* round up poll timeoutDaniel Drake2008-06-151-0/+5
| | | | | Pointed out by Richard Röjfors, otherwise we end up busy-looping with a poll() timeout of 0.
* fix doc about libusb_open()Felipe Balbi2008-06-151-1/+6
| | | | | | | libusb_open() returns int instead of libusb_device_handle. Signed-off-by: Felipe Balbi <me@felipebalbi.com> [dsd: small correction]
* Temporary workaround for event handling serialization issueDaniel Drake2008-05-291-1/+15
| | | | | | | | | | | | Ludovic Rousseau pointed out that libusb_unlock_events() is not called when a thread gets terminated with a signal, meaning that event waiters will not be woken up in this case. Add a temporary hack to libusb_event_handler_active() so that at least the other threads will realise on the next iteration of their event handling loop. The real fix will likely involve reworking most of this.
* Refine libusb_set_configuration() semanticsDaniel Drake2008-05-293-3/+120
| | | | | | | | | | | | | Applications will generally want to set a configuration before claiming interfaces. The problem is that the interface may already be set, and someone else may have claimed an interface (meaning that all calls to set_configuration will fail, even if it's for the same configuration). There are now 2 options: 1. Use the new libusb_get_configuration() to determine active configuration before calling libusb_set_configuration() 2. Or just call libusb_set_configuration() as usual, which will do nothing if that configuration is already active.
* v0.9.0 releasev0.9.0Daniel Drake2008-05-253-5/+15
| | | | First libusb-1.0 beta release
* Take lock before raising event waiters conditionDaniel Drake2008-05-251-0/+2
| | | | | This avoids a race between the user checking for active event handler and then blocking on the condition variable
* Implement serialization of event handlersDaniel Drake2008-05-254-30/+523
| | | | | | Now offers a mechanism to wait for events while another thread is doing the event handling. Complicates things for MT async apps, but then again it's a bit of a tricky combination to start with.
* allow LIBUSB_DEBUG env var to control message verbosity at runtimeDaniel Drake2008-05-241-5/+50
| | | | Based on ideas from Ludovic Rousseau
* don't print messages by defaultDaniel Drake2008-05-232-0/+35
| | | | | | | Add libusb_set_debug() API to set message verbosity. Ludovic Rousseau pointed out that applications may close stdout/stderr descriptors, which might then be reused.
* Fix memory leak in libusb_control_transferDaniel Drake2008-05-191-0/+1
| | | | Pointed out by David Engraf: we weren't freeing the transfer buffer
* Linux: fix handling of ioctl failureDavid Engraf2008-05-191-14/+16
| | | | | | The return value of some ioctl commands in linux_usbfs.c are not handeled correct. The ioctl function returns != 0 and errno is set with the error code.
* critical memory leak in handle_eventsDavid Engraf2008-05-191-0/+4
| | | | | | | This patch closes a critical memory leak in handle_events. The fds variable is malloced but never freed. When I'm calling handle_events with a timeout of 0, my system runs out of memory after a few seconds.
* More informative libusb_open() return codeDaniel Drake2008-05-163-21/+32
| | | | Hopefully one of the last API tweaks...
* Fix endianness with descriptor handlingDaniel Drake2008-05-164-58/+87
| | | | | Alan Stern pointed out that usbfs gives host-endian data, but sysfs gives bus-endian.
* Backend documentation for porting effortsDaniel Drake2008-05-135-14/+461
| | | | Hopefully comprehensive enough for people to get started.
* Linux: fix caching of guessed configurationDaniel Drake2008-05-121-5/+11
| | | | Reported and tested by Xiaofan Chen
* Linux: fix bulk transfer early completionRob Walker2008-05-111-7/+42
| | | | | | | We were forgetting about the remaining urbs when a non-final urb completed early. [dsd: some touchups and a warning message for a corner case that we don't handle]
* Handle hot-unpluggingDaniel Drake2008-05-118-89/+236
| | | | | This involved moving from select() to poll() because there is no way to distinguish usbfs's POLLERR condition with select().
* Documentation workDaniel Drake2008-05-113-2/+67
|