Re: libusb and hal




----- Original Message -----
From: Matt Davey
Time: 09-10-07 19:32
> 
> Tom,
> 
> Thanks for your work on this already.  Are you saying that the
> "usb_device" is only added once, even if you disconnect the z22
> physically from your computer?

Exactly.
I must say I have not tried if there is some timeout on this, that it
will disappear after a time. But even then you would not be able to sync
between the timeouts.

> 
> Can you watch other HAL events to see what gets generated when you
> attempt a sync?  I'm sure there'll be something we can hook into, and
> then it might be time for gnome-pilot 2.0.16...

it seems the hal_device_added is always called at least twice. One time
it already exits here
if (!(bus = libhal_device_get_property_string (hal_ctx, udi, "info.bus",
NULL))) {
		return;
	}
So you can't do anything with that I think.

The second time it exits here
if (strcmp (bus, "usb_device") != 0 ) {
	libhal_free_string (bus);
	return;
}
and it seems bus it set to "usb".  My best guess is that when you get an
adding where bus = usb, you might be able to ask hal if there is already
a palm "usb_device" available, and if so, use it. But I have no idea how
to do that :-)

Regards,
Tom




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]