[evolution-data-server/cursor-staging: 2/25] EBookBackendSqliteDB: Fixed an inconsistency in phone number matches.



commit 586c302f30a4fa8407c4e763fc9ed4e8dcc05d0b
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Fri Oct 4 00:04:14 2013 +0200

    EBookBackendSqliteDB: Fixed an inconsistency in phone number matches.
    
    The phone number national number matching algoritm was hard coding
    the country code length to 2, causing some random results.

 .../libedata-book/e-book-backend-sqlitedb.c        |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/addressbook/libedata-book/e-book-backend-sqlitedb.c 
b/addressbook/libedata-book/e-book-backend-sqlitedb.c
index 7792962..3138319 100644
--- a/addressbook/libedata-book/e-book-backend-sqlitedb.c
+++ b/addressbook/libedata-book/e-book-backend-sqlitedb.c
@@ -1207,7 +1207,7 @@ ixphone_compare_national (gpointer data,
                        if (sep2 != str2)
                                cmp = e_strcmp2n (country_code, strlen (country_code), str2, sep2 - str2);
                } else if (sep2 == str2) {
-                       cmp = e_strcmp2n (str1, sep1 - str1, country_code, 2);
+                       cmp = e_strcmp2n (str1, sep1 - str1, country_code, strlen (country_code));
                } else {
                        /* Also compare the country code if the national number
                         * matches and both numbers have a country code. */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]