Re: libusb and hal



On Tue, 2007-10-09 at 19:58 +0200, Tom Billiet wrote:
> 
> ----- 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

I don't know beans about USB, but thinking about what you've described
in this series of e-mails, it seems to me that you need to beware of the
case of HAL remembering a Palm device that was formerly attached but is
no longer there.   That in turn makes me think that if HAL is
remembering a device that is no longer there, then maybe the problem is
in the HAL logic.   Are the supporters of that code on this mailing list
or is that a kernel topic?

Drew




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