Linux bluetooth development
 help / color / mirror / Atom feed
From: Slawomir Bochenski <lkslawek@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: Slawomir Bochenski <lkslawek@gmail.com>
Subject: [PATCH] Fix incorrect number of expected columns in a response to NEW_MISSED_CALLS_LIST
Date: Wed, 18 May 2011 11:13:33 +0200	[thread overview]
Message-ID: <1305710013-31563-1-git-send-email-lkslawek@gmail.com> (raw)

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


             reply	other threads:[~2011-05-18  9:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-18  9:13 Slawomir Bochenski [this message]
2011-05-18  9:17 ` [PATCH v2] Fix incorrect number of expected columns in a response to NEW_MISSED_CALLS_LIST Slawomir Bochenski
2011-05-18 20:30   ` Johan Hedberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1305710013-31563-1-git-send-email-lkslawek@gmail.com \
    --to=lkslawek@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox