From 5325642562f15edb668bc716c3282bec17b38bfd Mon Sep 17 00:00:00 2001 From: Mateusz Polrola Date: Mon, 22 Sep 2014 12:58:52 +0200 Subject: [PATCH] PBAP: Wrong behaviour when SYNCEVOLUTION_PBAP_CHUNK_TRANSFER_TIME is <= 0. Setting SYNCEVOLUTION_PBAP_CHUNK_TRANSFER_TIME to value <= 0 is not working like described in README file. Currently in such case desired chunk size is very quickly decreasing to 0 and causing synchronization finish without downloading all contacts. This patch is disabling tuning desired chunk size in such case, keeping transfer size constant and equal to initially set value. --- src/backends/pbap/PbapSyncSource.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backends/pbap/PbapSyncSource.cpp b/src/backends/pbap/PbapSyncSource.cpp index 05aa832..cfa46eb 100644 --- a/src/backends/pbap/PbapSyncSource.cpp +++ b/src/backends/pbap/PbapSyncSource.cpp @@ -983,7 +983,8 @@ bool PullAll::getContact(const char *id, pcrecpp::StringPiece &vcard) // time. Ignore clipped or suspended transfers, they are // not representative. Also avoid completely bogus // observations. - if (!m_wasSuspended && + if (m_pullParams.m_timePerChunk > 0 && + !m_wasSuspended && m_transferMaxCount == m_desiredMaxCount && m_lastTransferRate > 0 && m_lastContactSizeAverage > 0) { -- 1.7.11.7