[Nut-upsdev] [nut-commits] svn commit r1072 - in trunk: .

Arjen de Korte nut+devel at de-korte.org
Thu Aug 23 17:22:45 UTC 2007


Peter Selinger wrote:

>> Indeed. And even if it is indeed the same device, the data may have
>> changed anyway, so I agree that on a reconnect we should at least re-read
>> everything. Unfortunately, we have no way to kwow if on a reconnect we
>> have an exact or regex match, so this needs to be worked on too. On an
>> exact match, it is probably OK to keep the report descriptor (it's the
>> same device), while for a regex match we need to parse it again, right?
> I wouldn't bother making the distinction. Re-parsing the report
> descriptor takes next to no effort at all.

I would. If we don't need to re-parse the report descriptor (because we
have an exact match), it means that we can keep the NUT-to-HID table we
created before. This also means that we don't have to DELINFO/DELCMD
each variable and command, before setting the new information (which
we'll have to do anyway) with SETINFO/SETCMD. That cuts the amount of
traffic between driver and server in half. It also means that no memory
(de)allocation will be needed, which is a plus too, since it can't go wrong.

Best regards, Arjen



More information about the Nut-upsdev mailing list