gentl: always call IFUpdateDeviceList before IFOpenDevice#1002
gentl: always call IFUpdateDeviceList before IFOpenDevice#1002psoftware wants to merge 1 commit intoAravisProject:mainfrom
Conversation
|
@xiaoqiangwang, just pinging you since you first implemented the support for GenTL and might not be watching the repository. ;) |
|
I thought of that but decided it would violate the "do-one-thing" principle. There is a public API, arv_update_device_list for that. |
|
I've just had a quick look. This patch is simple, but does not feel right. I think it would be better to make aravis not call IFClose and TLClose automatically on the last use. It would also probably improve the performance on device opening. |
Surely it does not follow that rule, which also bothered me. Maybe this requirement should be moved above the interface.
It was the easiest way to avoid changing things at the caller site. Consider also that the internal implementation does not feel right too. The internal device hashmap cache is updated by the I will be able to work on this starting from the next week if you have any ideas (: Thank you for your reviewing! |
Fixes #1001.
I am not sure this is the right way to fix it. In arvgentlsystem.c I see there is a device hashmap which is updated by the
_discoverfunction. That function invokes TLOpen -> IFOpen -> IFOpenDevice -> IFClose -> TLClose and keeps the hashmap updated with the current internal list of the gentl producer. Introducing this patch would allow to have a not up-to-date hashmap.