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



commit a871afcff7cbf7b6cada244f32c5b292f3b5414d
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]