Bug 84179

Summary: Wrong behaviour when SYNCEVOLUTION_PBAP_CHUNK_TRANSFER_TIME is <= 0
Product: SyncEvolution Reporter: Mateusz Polrola <mateusz.polrola>
Component: PBAPAssignee: SyncEvolution Community <syncevolution-issues>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: syncevolution-issues
Version: 1.3.99.3   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Proposed patch

Description Mateusz Polrola 2014-09-22 11:45:18 UTC
Setting SYNCEVOLUTION_PBAP_CHUNK_TRANSFER_TIME to value <= 0 is not
working like described in README file - according to it, it should turn it off, which in my understanding should disable tuning of chunks size and use constant value for each transfer (equal either to SYNCEVOLUTION_PBAP_CHUNK_MAX_COUNT_PHOTO or SYNCEVOLUTION_PBAP_CHUNK_MAX_COUNT_NO_PHOTO).
Currently in such case chunk size is modified and is decreasing very quickly until reaching 0, which causes synchronization finish without downloading all
contacts and without returning any error.
Comment 1 Mateusz Polrola 2014-09-22 11:46:44 UTC
Created attachment 106671 [details] [review]
Proposed patch
Comment 2 Patrick Ohly 2014-09-24 11:12:07 UTC
I think the "turned off with any value <= 0 seconds" for SYNCEVOLUTION_PBAP_CHUNK_TRANSFER_TIME comes from a time when SYNCEVOLUTION_PBAP_CHUNK_MAX_COUNT_[NO_]PHOTO did not exist yet and _TRANSFER_TIME controlled whether chunking was done at all.

In the current code, setting it to 0 or negative value is invalid (contrary to what the documentation says). It makes sense to interpret the "turned off" as "disable auto-tuning" and therefore I am applying the patch to the master branch.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.