From 6e7ac360a1faf344e50c34852a3f36e953b089b2 Mon Sep 17 00:00:00 2001 From: Slawomir Bochenski Date: Wed, 18 May 2011 11:17:50 +0200 Subject: [PATCH] obexd: Fix GLib assertion in NEW_MISSED_CALLS_LIST reply handling 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. --- obexd/plugins/phonebook-tracker.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/obexd/plugins/phonebook-tracker.c b/obexd/plugins/phonebook-tracker.c index 9431d8af8..8da8b80af 100644 --- a/obexd/plugins/phonebook-tracker.c +++ b/obexd/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); -- 2.47.3