[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [coldsync-hackers] Re: Problem respawning coldsync daemon
On Thu, Feb 28, 2002 at 09:05:26PM +0100, Alessandro Zummo wrote:
> On 28-Feb-02 at 03:11:10,
> Andrew Bainbridge-Smith <Andrew.Bainbridge-Smith@csiro.au> wrote:
>
>
> > On Thu, 2002-02-28 at 12:00, Alessandro Zummo wrote:
>
> >> Great. Andrew, do you have any suggestion on the better way to fix this?
>
> > Not until I have a look at the code. I don't think a sleep in the code
> > is the right approach, but I may use this method to try and isolate what
> > part seems to be time critical. Another alternative is to make daemon
> > mode a genuine daemon (we do that with some of our stuff here with
> > imaging not pda) ie. don't die after syncing. If you have suggests
> > about where I should start looking first then I'm all ears.
>
> Actually, this is what happens:
>
> 1 - HotSync
> 2 - ColdSync closes the serial port
> 3 - little delay
> 4 - The Palm removes itself from the USB bus
> 5 - The module driver ( visor.o ) removes the device entry.
>
> The problem happens if we launch hotsync between 3 and 5, when
> the device entry has not yet been removed.
>
> Maybe we could keep the device open until visor.o removes it?
> There's a way to detect such a condition?
You can just keep the port open until it dissapears (in step 4). And
you can catch the hotplug event that states that the device has now been
removed from the USB bus.
But it might just be easier to do the delay :)
good luck,
greg k-h
--
This message was sent through the coldsync-hackers mailing list. To remove
yourself from this mailing list, send a message to majordomo@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body. For more
information on Coldsync, send mail to coldsync-hackers-owner@thedotin.net.