Ok,

The problem is that all instances of the same input use the same
static devinfo struct, so only the last origin is kept.
the devinfo should by malloc'd.

I suggest cleaning this up with an internal API addition:

int _giiRegisterDeviceInfo(gii_input,
                           gii_cmddata_getdevinfo *,
                           gii_cmddata_getvalinfo *);

failing if the the structure couldn't be allocated.

It gives modules a somewhat cleaner way to associate multiple devices
to an input, since they don't have to mess with the list structure or
the origin counting scheme.

giiClose would loop through to free() the allocated devinfo struct.

Comments ?

Eric.

Reply via email to