Libusb : fix segfault + updates
Submitted by geert jordaens
Link to original bug (#638094)
Description
-
Make Context nullable for DeviceHandle.from_vid_pid
-
Remove [CCode (array_length = false)] from get_device_list This this fixes a segfault for :
/* valac --pkg libusb-1.0 TestLibUsb.vala */ using LibUSB;
namespace TestLibUSb
{
public static class TestLibUSb
{
static int main (string[] args)
{
Context context = null;
Device[] devices = null;
Context.init (out context);
context.get_device_list(out devices);
return 0;
}
} }
-
Replace Glib.TimeVal with Posix.TimeVal for methods wait_for_event, handle_events_timeout and handle_events_locked
-
add TransferFlags