mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Fix --auto new and --auto latest on MacOS.
'device_list' was both a global (eww!) and a local inside tty_search_for_serial_devices(). The local got set and returned, so it looked sane, but the caller used the global instead of the return value of the function it had just called, meaning (global) device_list was NULL while (ignored, local) device_list held a perfectly lovely linked list. Tested: tio --auto new waits for a new device to appare and connects tio --latest will connect to the most recently attached device which, in most worlds, is the most recently enumerated USB device, conveniently skipping all the bluetooth nonsense. If the lone USB device is disconnected, it then connects to one of those, meaning you really do have to restart tio.
This commit is contained in:
parent
22dd954550
commit
67c071633d
1 changed files with 1 additions and 1 deletions
|
|
@ -1938,7 +1938,7 @@ char *getDeviceLocation(io_object_t device)
|
|||
// for __APPLE__
|
||||
GList *tty_search_for_serial_devices(void)
|
||||
{
|
||||
GList *device_list = NULL;
|
||||
search_reset();
|
||||
io_iterator_t iter = IO_OBJECT_NULL;
|
||||
CFMutableDictionaryRef matchingDict = NULL;
|
||||
listing_device_name_length_max = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue