Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
There may be unwanted prompts for >1 LTO Flash! connected #41
Testing filtering device connections based on USB VID and PID. Noticed that when "switching" devices, the prompt appeared while in the background (behind the dialog prompt) the validation progress bar had appeared.
In this case, had plugged in a generic USB<->Serial stick, and the validation code was waiting for the beacon from the hardware (which would never come).
Thing is... when explicitly choosing to switch connections, the prompt to "connect to detected device" should NOT appear.
Minor issue, but it can be annoying. As I'm down to one functional unit for the time being, testing with multiple real devices is not possible.
Looks like CreationInfo during the selection process is falling on the floor.
When you choose to connect to a different LTO Flash!, we create a "new" device and add it to the collection of peripherals. The state data passed along here is expressed as a dictionary. Eventually, we reach the function Device.GetLtoFlashDevice().
That function only looks directly at the passed in state data as a DeviceCreationInfo instance -- it does not consider the usage of a Dictionary which contains multiple bits of information.
The fix here is to clean up how that state is processed to be consistent.
If it were to show anything at all, it should show the other valid LTO Flash! device!
This issue will be avoided by fixing the secondary bug -- namely if the newly arrived port does not belong to an LTO Flash! device, then don't show the dialog at all.