summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* trivial: Use SPDX-License-Identifier in one more placeRichard Hughes2022-06-161-12/+1
|
* trivial: Remove some duplicate header includesRichard Hughes2022-06-1611-20/+0
|
* Only include the start year in the copyright headerRichard Hughes2022-06-1611-11/+11
| | | | | The end year is legally and functionally redundant, and more importantly causes cherry-pick conflicts when trying to maintain old branches.
* gusb: Add some umockdev based testsBenjamin Berg2022-06-154-1/+231
| | | | The primary purpose for this is to test the hotplug codepaths.
* Never dispatch idle events after the context has been destroyedRichard Hughes2022-06-151-12/+37
| | | | | Also, reduce the number of idle sources by batching them up as much as possible.
* Release version 0.3.100.3.10Richard Hughes2022-01-101-0/+7
|
* trivial: Remove the '1:1 already exists' debug lines on rescanRichard Hughes2022-01-061-3/+1
|
* Add API to change the hotplug poll intervalRichard Hughes2022-01-063-3/+79
|
* trivial: post release version bumpRichard Hughes2021-12-072-6/+6
|
* Release version 0.3.90.3.9Richard Hughes2021-12-071-0/+9
|
* trivial: Sync spec file with downstreamRichard Hughes2021-12-071-3/+1
|
* trivial: Fix FreeBSD CIRichard Hughes2021-12-071-2/+2
|
* Fix hotplug after threaded device removalRichard Hughes2021-12-071-1/+1
| | | | Somehow this worked when we unref'd the context but did not ref it.
* Fix version script check for GNU BFD linker on FreeBSDTing-Wei Lan2021-10-102-2/+10
| | | | | | | | | | | | | | | | | | On FreeBSD, symbols 'environ' and ' __progname' are defined in crt1.o and referenced by libc.so. This makes it different from platforms which define 'environ' in libc.so. GNU BFD linker fails to link an executable if these two symbols are not put into the global section of the version script because a shared library should not reference a local symbol defined in a different object file. GNU gold and LLVM LLD don't have the problem. This means the current check for --version-script fails on FreeBSD when GNU BFD linker is used. The failure can be avoided by linking a shared library instead of an executable, but meson doesn't support passing additional arguments to the compiler in its 'has_link_argument' method. Instead of adding these two unused symbols to the real version script, use a smaller version script specifically made for the test.
* Don't hard-code the list of OS supporting --version-scriptTing-Wei Lan2021-10-101-2/+3
| | | | | Instead of keeping a list of OS in the build file, it should be better to run a check to determine if it is supported by the linker.
* trivial: post release version bumpRichard Hughes2021-10-062-5/+5
|
* Release version 0.3.80.3.8Richard Hughes2021-10-061-0/+11
|
* trivial: No longer require vala-tools to build the vapiRichard Hughes2021-10-051-1/+0
|
* trivial: Rename the master branch to mainRichard Hughes2021-10-051-2/+2
|
* context: Fix hotplug handling and signal emission during enumerateBenjamin Berg2021-10-051-50/+56
| | | | | | | | | | | | | | | | | | | | | | Initial device enumeration may happen in a random order. This causes issues if someone calls g_usb_device_get_parent from the "device-added" signal handler. The problem is. that this will cause an infinite recursion as GUsb tries to enumerate again, which results in the device to be added. Also, the order of devices is random and resolving the parent requires the full list of devices. As such, we should delay emission until the internal array has been filled. To fix this, emit the signals from g_usb_context_enumerate. Also, while changing this, it became obvious that libusb hotplug callback is updating priv->devices from the libusb thread, only pushing it to an idle handler when the signal is emitted. Doing this is unsafe if hotplug events arrive during enumeration. Push libusb event into the mainloop immediately in order to process it. Doing means that any libusb hotplug events arriving during g_usb_context_enumerate will be handled after the function has returned. Making all possible corner cases behave correctly.
* trivial: Add the GUsbEndpoint methods to the docsRichard Hughes2021-10-051-0/+1
|
* Add g_usb_device_get_string_descriptor_bytes_fullmasterRicardo Cañuelo2021-09-303-15/+57
| | | | | | | Some devices won't answer to a request with a 128-byte data buffer, this allows the user to specify the size of the request data buffer. g_usb_device_get_string_descriptor_bytes still uses the default buffer size (128 bytes).
* trivial: post release version bumpRichard Hughes2021-05-242-5/+5
|
* Release version 0.3.70.3.7Richard Hughes2021-05-242-1/+15
|
* trivial: Fix a warning when used in a subprojectRichard Hughes2021-05-221-2/+1
| | | | | | | Fixes: DEPRECATION: Library was passed to the libraries keyword argument of a previous call to generate() method instead of first positional argument.
* Add a FreeBSD CI targetRichard Hughes2021-05-211-1/+18
|
* trivial: Do not hardcode the libusb.h include directoryRichard Hughes2021-05-211-5/+5
|
* Require *any* python3 to fix FreeBSD buildRichard Hughes2021-05-211-1/+1
|
* trivial: Make build_and_test.sh less of a footgunRichard Hughes2021-05-211-1/+0
|
* Do not depend on libusb_get_port_number() to fix DragonFlyBSD compileRichard Hughes2021-05-212-1/+13
|
* Do not depend on libusb_get_parent() to fix FreeBSD compileRichard Hughes2021-05-212-0/+12
|
* Lower the libusb dep to fix compile on FreeBSDRichard Hughes2021-05-212-6/+27
| | | | | | | | | | | FreeBSD is not a supported platform of libusb. The native USB access library on FreeBSD is libusb20, which provides both the non-portable FreeBSD-specific API and wrapper functions that are mostly compatible eith libusb 1.0 API. It is an integral part of FreeBSD and the version included in the oldest supported FreeBSD release reports 1.0.9 in its libusb-1.0.pc. Based on a patch by Ting-Wei Lan <lantw@src.gnome.org>, many thanks.
* Do not run the tests on FreeBSDRichard Hughes2021-05-211-0/+10
| | | | | | Root hubs on FreeBSD have vid and pid set to zero. Based on a patch by Ting-Wei Lan <lantw@src.gnome.org>
* trivial: Move Debian CI to busterRichard Hughes2021-05-212-3/+3
|
* Only run CI build on masterRichard Hughes2021-05-211-1/+5
|
* Move the CI to GitHub actionsRichard Hughes2021-05-213-15/+20
|
* device: Reference the libusb device when setMarco Trevisan (Treviño)2021-04-131-3/+13
| | | | | | | | | We used to reference a device during the initable init vfunc, however it's better to do it when the device is actually set as an object property. In this way, the device is always unreffed when the object is disposed, without having to care about the ordering.
* device: Do not double-reference USB devicesMarco Trevisan (Treviño)2021-04-131-2/+0
| | | | | | | | | | | Currently gusb-device adds two references to an internal libusb device, causing a memory leak on destruction. In fact, we add a reference when the device is constructed and when the device is inited. To avoid this and ensure that libusb will cleanup all the devices on context destruction, only reference on device initialization.
* trivial: Fix a tiny memork leak when running the gusb test toolRichard Hughes2021-04-121-0/+1
|
* trivial: post release version bumpRichard Hughes2021-03-122-5/+5
|
* Release version 0.3.60.3.6Richard Hughes2021-03-121-0/+11
|
* Add g_usb_device_get_string_descriptor_bytes()Richard Hughes2021-01-273-0/+62
| | | | This is requried for the GD32VF103 device.
* trivial: Include string.h for memcpy()Richard Hughes2020-12-141-0/+2
|
* Merge pull request #42 from benzea/benzea/fix-cancellationIgnacio Casal Quinteiro2020-11-031-27/+42
|\ | | | | device: Fix cancellation if cancellable is already cancelled
| * device: Fix cancellation if cancellable is already cancelledBenjamin Berg2020-10-011-27/+42
|/ | | | | | | | | | | libusb can only handle cancellation if the transfer is already in-flight. However, g_cancellable_connect will immediately call the callback and then libusb_cancel_transfer when the cancellable is already cancelled at the time the transfer is submitted. Move the cancellation registration to after transfer submission to avoid ordering issues. Also avoid even submitting the transfer if the cancellable is already cancelled to begin with.
* trivial: Fix up typos spotted by codespellRichard Hughes2020-09-243-8/+8
|
* trivial: Check the return code of g_option_context_parse()Richard Hughes2020-09-011-1/+6
|
* Properly set dylib versions on darwinCaleb Xu2020-08-032-3/+4
|
* trivial: post release version bumpRichard Hughes2020-07-302-4/+4
|
* Release version 0.3.50.3.5Richard Hughes2020-07-301-0/+14
|