GK> What error would you expect? coldsync should eventually timeout.
but coldsync ignore this timeout and do infinite loop:
do {
CMP_TRACE(5)
fprintf(stderr, "===== Waiting for wakeup packet\n");
err = cmp_read(pconn, &cmpp);
if (err < 0)
{
if (PConn_get_palmerrno(pconn) == PALMERR_TIMEOUT)
continue;
palm_perror("cmp_read", PConn_get_palmerrno(pconn));
return ~0;
}
} while (cmpp.type != (ubyte) CMP_TYPE_WAKEUP);
GK> Also, what kernel version are you using?
2.4.23, but i think it's not important
>> i reconnect usb/serial converter, all look ok, but file descriptor,
>> used by coldsync, is invalid and coldsync is unusable
GK> Of course the file descriptor is invalid. It's a new device. There is
GK> no way to reconnect the file descriptor to the old one.
but why don't close after timeout old descriptor and open new? i think
it's right way, but not very simple to do...
This message was sent through the coldsync-hackers mailing list. To remove
yourself from this mailing list, send a message to majo...@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body. For more
information on Coldsync, send mail to coldsync-ha...@thedotin.net.
today i have other problem - i use usb/serial adapter and it can
disconnect/reconnect. sometimes i get next messages from kernel:
hub.c: already running port 1 disabled by hub (EMI?), re-enabling...
usb.c: USB disconnect on device 00:0f.2-1 address 62
usb.c: USB disconnect on device 00:0f.2-1.4 address 63
ftdi_sio.c: error from flowcontrol urb
ftdi_sio.c: Error from DTR LOW urb
ftdi_sio.c: Error from RTS LOW urb
usbserial.c: FTDI 8U232AM Compatible converter now disconnected from ttyUSB0
hub.c: already running port 1 disabled by hub (EMI?), re-enabling...
hub.c: USB hub found
hub.c: 4 ports detected
hub.c: new USB device 00:0f.2-1.4, assigned address 65
usbserial.c: FTDI 8U232AM Compatible converter detected
usbserial.c: FTDI 8U232AM Compatible converter now attached to ttyUSB0 (or usb/tts/0 for devfs)
after it file descriptor for /dev/ttyUSB0 is not functional and i
can't do sync. i understand, it's not coldsync problem, but it's
possible after timeout close file descriptor and reopen it.
ok, other situation: i manualy disconnect usb/serial converter,
coldsync don't get any error. i reconnect usb/serial converter, all
look ok, but file descriptor, used by coldsync, is invalid and coldsync
is unusable
This message was sent through the coldsync-hackers mailing list. To remove
Well that's a coldsync bug, not a kernel bug.
> GK> Also, what kernel version are you using?
>
> 2.4.23, but i think it's not important
It's always important when dealing with USB drivers :)
> >> i reconnect usb/serial converter, all look ok, but file descriptor,
> >> used by coldsync, is invalid and coldsync is unusable
>
> GK> Of course the file descriptor is invalid. It's a new device. There is
> GK> no way to reconnect the file descriptor to the old one.
>
> but why don't close after timeout old descriptor and open new? i think
> it's right way, but not very simple to do...
That sounds like the proper fix.
Good luck,
greg k-h
What error would you expect? coldsync should eventually timeout.
Also, what kernel version are you using?
> i reconnect usb/serial converter, all look ok, but file descriptor,
> used by coldsync, is invalid and coldsync is unusable
Of course the file descriptor is invalid. It's a new device. There is
no way to reconnect the file descriptor to the old one.
Sorry, but this is the way it is supposed to work.
greg k-h
You have a flaky hub/device. Please use a powered USB hub. That's the
problem, no software can fix this :)
Good luck,
greg k-h