2011-05-18 09:13:33

by Slawomir Bochenski

[permalink] [raw]
Subject: [PATCH] Fix incorrect number of expected columns in a response to NEW_MISSED_CALLS_LIST

This fixes error "GLIB CRITICAL ** Tracker -
tracker_db_cursor_get_value_type: assertion `column < n_columns' failed"
occurring when pulling phone book or doing listing for missed calls. The
number of expected columns in reply to NEW_MISSED_CALLS_LIST query was
incorrectly set PULL_QUERY_CALL_AMOUNT (23) but the query actually
returns 3 columns.
---
plugins/phonebook-tracker.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/plugins/phonebook-tracker.c b/plugins/phonebook-tracker.c
index 9431d8a..8da8b80 100644
--- a/plugins/phonebook-tracker.c
+++ b/plugins/phonebook-tracker.c
@@ -49,6 +49,7 @@
#define ADDR_FIELD_AMOUNT 7
#define PULL_QUERY_COL_AMOUNT 23
#define COUNT_QUERY_COL_AMOUNT 1
+#define NEW_MISSED_CALLS_COL_AMOUNT 3

#define COL_PHONE_AFF 0 /* work/home phone numbers */
#define COL_FULL_NAME 1
@@ -2029,7 +2030,7 @@ int phonebook_pull_read(void *request)

if (g_strcmp0(data->req_name, "/telecom/mch.vcf") == 0) {
query = NEW_MISSED_CALLS_LIST;
- col_amount = PULL_QUERY_COL_AMOUNT;
+ col_amount = NEW_MISSED_CALLS_COL_AMOUNT;
pull_cb = pull_newmissedcalls;
} else if (data->params->maxlistcount == 0) {
query = name2count_query(data->req_name);
--
1.7.4.1



2011-05-18 20:30:10

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH v2] Fix incorrect number of expected columns in a response to NEW_MISSED_CALLS_LIST

Hi Slawek,

On Wed, May 18, 2011, Slawomir Bochenski wrote:
> This fixes error "GLIB CRITICAL ** Tracker -
> tracker_db_cursor_get_value_type: assertion `column < n_columns' failed"
> occurring when pulling phone book or doing listing for missed calls. The
> number of expected columns in reply to NEW_MISSED_CALLS_LIST query was
> incorrectly set to PULL_QUERY_COL_AMOUNT (23) but the query actually
> returns 3 columns.
> ---
> Just a little modification of a commit message.
>
> plugins/phonebook-tracker.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)

Applied, but I had to first edit your commit message summary line to be
considerably shorter.

Johan

2011-05-18 09:17:50

by Slawomir Bochenski

[permalink] [raw]
Subject: [PATCH v2] Fix incorrect number of expected columns in a response to NEW_MISSED_CALLS_LIST

This fixes error "GLIB CRITICAL ** Tracker -
tracker_db_cursor_get_value_type: assertion `column < n_columns' failed"
occurring when pulling phone book or doing listing for missed calls. The
number of expected columns in reply to NEW_MISSED_CALLS_LIST query was
incorrectly set to PULL_QUERY_COL_AMOUNT (23) but the query actually
returns 3 columns.
---
Just a little modification of a commit message.

plugins/phonebook-tracker.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/plugins/phonebook-tracker.c b/plugins/phonebook-tracker.c
index 9431d8a..8da8b80 100644
--- a/plugins/phonebook-tracker.c
+++ b/plugins/phonebook-tracker.c
@@ -49,6 +49,7 @@
#define ADDR_FIELD_AMOUNT 7
#define PULL_QUERY_COL_AMOUNT 23
#define COUNT_QUERY_COL_AMOUNT 1
+#define NEW_MISSED_CALLS_COL_AMOUNT 3

#define COL_PHONE_AFF 0 /* work/home phone numbers */
#define COL_FULL_NAME 1
@@ -2029,7 +2030,7 @@ int phonebook_pull_read(void *request)

if (g_strcmp0(data->req_name, "/telecom/mch.vcf") == 0) {
query = NEW_MISSED_CALLS_LIST;
- col_amount = PULL_QUERY_COL_AMOUNT;
+ col_amount = NEW_MISSED_CALLS_COL_AMOUNT;
pull_cb = pull_newmissedcalls;
} else if (data->params->maxlistcount == 0) {
query = name2count_query(data->req_name);
--
1.7.4.1