From 3954d81ae779d2ced33f681a3f520c2fb0ac4108 Mon Sep 17 00:00:00 2001 From: Radoslaw Jablonski Date: Thu, 19 May 2011 10:29:22 +0300 Subject: [PATCH] obexd: Fix newmissedcalls handling for large responses Previously pull_newmissedcalls was called for every part when processing large response (more that one part of results) and number of 'newmissedcalls' was wrong in that scenario. Now newmissedcalls will be counted only once (during generating first part of mch results). --- obexd/plugins/phonebook-tracker.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/obexd/plugins/phonebook-tracker.c b/obexd/plugins/phonebook-tracker.c index eec1e5dc9..3ff188ae6 100644 --- a/obexd/plugins/phonebook-tracker.c +++ b/obexd/plugins/phonebook-tracker.c @@ -1544,7 +1544,11 @@ int phonebook_pull_read(void *request) if(!data) return -ENOENT; - if (g_strcmp0(data->req_name, "/telecom/mch.vcf") == 0) { + if (g_strcmp0(data->req_name,"/telecom/mch.vcf") == 0 && + data->tracker_index == 0) { + /* new missed calls amount should be counted only once - it + * will be done during generating first part of results of + * missed calls history */ query = NEW_MISSED_CALLS_LIST; col_amount = NEW_MISSED_CALLS_COL_AMOUNT; pull_cb = pull_newmissedcalls; -- 2.47.3