[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[coldsync-hackers] 3.0-pre3: serial comm problems
- To: coldsync-hackers at lusars dot net
- Subject: [coldsync-hackers] 3.0-pre3: serial comm problems
- From: Christophe Beauregard <christophe dot beauregard at sympatico.ca>
- Date: Thu, 15 May 2003 23:12:20 -0400
- Reply-to: coldsync-hackers at lusars dot net
- Sender: owner-coldsync-hackers at lusars dot net
- User-agent: KMail/1.4.3
I've been spending the last few days trying to figure out why my m105 is
periodically not completing a serial sync (about 1 in 4 syncs, on average).
I've narrowed the problem down and it looks like the connection is being
"lost" prematurely. As in, sometime between the last sync time being set
and the connection getting closed.
That strikes me as suspicious. I'm still looking into it, but since I'm
about to head for some sleep I thought I'd throw out my findings in case
someone with more familiarity with the code than I can make better sense of
it.
Here's roughly the process I used to track the problem:
Modified src/palmconn.c:Disconnect() as follows:
if (PConn_isonline(pconn))
{
...
} else {
SYNC_TRACE(5)
fprintf( stderr, "Disconnect called with pconn status %x\n",
PConn_get_status(pconn) );
}
Here's the tail end of two separate syncs (with debug flags -d sync:5 -d
dlp:5)... This one went all the way and completed properly:
Setting lastsyncPC to 0x7f000001
Setting last sync time to now
dlp_dlpc_req: sending request 0x11, trycount: 0
>>> request id 0x11, 1 args
dlp_dlpc_req: waiting for response
Got response, id 0x91, args 0, status 0
Running Install conduits
Installing new databases from "/home/cpb/.palm/install"
Closing connection to Palm
dlp_dlpc_req: sending request 0x2f, trycount: 0
>>> request id 0x2f, 1 args
dlp_dlpc_req: waiting for response
Got response, id 0xaf, args 0, status 0
===== Finished syncing
This one, on the other hand, didn't send the EndOfSync (0x2f) message, but
did trip my added code path in Disconnect():
Setting lastsyncPC to 0x7f000001
Setting last sync time to now
dlp_dlpc_req: sending request 0x11, trycount: 0
>>> request id 0x11, 1 args
dlp_dlpc_req: waiting for response
Got response, id 0x91, args 0, status 0
Running Install conduits
Installing new databases from "/home/cpb/.palm/install"
Closing connection to Palm
Disconnect called with pconn status 2
===== Finished syncing
pconn status 2 is, I believe, PCONNSTAT_LOST. There's only three places in
the code where LOST can be set... it's not in dlp.c or the trace would show
it, so it's obviously either padp or a PConn_select() failure. I'll spend
some more time tracking those tomorrow, hopefully.
c.
--
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.