On Fri, Apr 03, 2009 at 10:38:18AM +0200, Nicolas wrote:
> All seem work well.
>
> Good work !
Thanks for testing!
> I post some fix and new features.
> (all work perfectly under SID Debian)
I'm going through your patches, and I notice that in your "Near perfect"
patch, you add a try/catch:
- Catch the errors to avoid a "slow-sync"
@@ -606,6 +606,7 @@ bool VCardConverter::CommitRecordData(BarryEnvironment *env,
Barry::RecordBuilder<Barry::Contact, VCardConverter> builder(convert);
+ try {
if( add ) {
trace.log("adding record");
env->m_pDesktop->AddRecord(dbId, builder);
@@ -616,6 +617,11 @@ bool VCardConverter::CommitRecordData(BarryEnvironment *env
trace.log("clearing dirty flag");
env->m_pDesktop->ClearDirty(dbId, StateIndex);
}
+ }
+ catch (Barry::Error &e ) {
+ trace.logf("ERROR: VCardConverter::CommitRecordData - Format err
+ return false;
+ }
return true;
}
Does this really fix the slow sync for you? The exception should be caught in
barry_sync.cc:commit_change(), where osync_context_report_error() is
called anyway.
The only difference in code paths, as far as I can see, is that if the
exception is caught in commit_change(), then osync_context_report_error()
reports OSYNC_ERROR_IO_ERROR. If CommitData() returns false, then
osync_context_report_error() reports OSYNC_ERROR_PARAMETER.
Is this difference between error codes enough to cause a slow sync for you?
Thanks,
- Chris
------------------------------------------------------------------------------
_______________________________________________
Barry-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/barry-devel