Version: 4.3.3 (using KDE KDE 3.0.4) Installed from: SuSE RPMs OS: Linux When the pda aborts synching (for whatever reason) kpilot keeps on working and launches kaaddressbook, closes it again and, at the end, claims everything went fine... using a handspring visor edge usb
Hmm, yeah. It probably does (haven't _seen_ it happen, though). I doubt any of the PilotDatabase functions do realy error checking. I'll see what I can do.
I've seen this lots of times, and we really need to work out a way to detect this kind of problem and cancel the sync process, otherwise you might completely mess up your data. E.g. imagine a conduit that walks through all records on the handheld, and since it doesn't get any, it assumes that they were deleted on the handheld. Usually, this is a sane assumption and the only way to detect deleted records in some cases. Reinhold
*** Bug 50444 has been marked as a duplicate of this bug. ***
Launching the addressbook is so .. kpilot 4.3 or older. It now works with the new resources framework. Probably the error checking comment is still relevant, though.
Yes, the bug report is old, but the problem is still there: If the sync times out on the handheld (or the handheld is disconnected), kpilot happily goes on trying to sync, but doesn't get any data from the handheld. Nonetheless, the conduits are run, which might lead to data loss (the vcal and abook conduits at least check if one side is completely empty and then copy all data from the other side, but that's not a solution to this problem). Reinhold
CVS commit by adridg: During a sync, check between conduits to see ifthe Pilot is still there - if not, bail. This prevents the sync from running _too_ long when the Pilot has aborted, and might prevent data loss when conduits would otherwise run against a non-responsive Pilot (which behaves like an empty database then). CCMAIL: 49697@bugs.kde.org M +17 -2 syncStack.cc 1.33 --- kdepim/kpilot/kpilot/syncStack.cc #1.32:1.33 @@ -129,4 +129,7 @@ ConduitProxy::ConduitProxy(KPilotDeviceL l.append(CSL1("--test")); break; + case eDefaultSync: + Q_ASSERT(eDefaultSync != m); // Bail + break; } return l; @@ -337,5 +340,17 @@ void ActionQueue::actionCompleted(SyncAc if (isEmpty()) { - emit syncDone(this); + delayDone(); + return; + } + if (!fHandle->tickle()) + { + emit logError(i18n("The connection to the handheld " + "was lost. Synchronization cannot continue.")); + SyncAction *del = 0L; + while ( (del = nextAction()) ) + { + delete del; + } + delayDone(); return; }
Bail between conduits works - individual conduits will need much more work to detect lost connections. This is something for Pilot-link 0.12, which has better error reporting.