[evolution-data-server/openismus-work] sqlitedb: Fix another issue phonenumber matching issue



commit 74e3f1e54794404bc723a66696d33f1fe2553bfc
Author: Mathias Hasselmann <mathias openismus com>
Date:   Mon Mar 4 13:58:08 2013 +0100

    sqlitedb: Fix another issue phonenumber matching issue
    
    National match mode was broken when both numbers didn't have a country code.

 .../libedata-book/e-book-backend-sqlitedb.c        |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/addressbook/libedata-book/e-book-backend-sqlitedb.c 
b/addressbook/libedata-book/e-book-backend-sqlitedb.c
index 6d7d931..6f1b73c 100644
--- a/addressbook/libedata-book/e-book-backend-sqlitedb.c
+++ b/addressbook/libedata-book/e-book-backend-sqlitedb.c
@@ -1210,7 +1210,8 @@ ixphone_compare_national (gpointer      data,
         */
        if (cmp == 0) {
                if (sep1 == str1) {
-                       cmp = e_strcmp2n (country_code, 2, str2, sep2 - str2);
+                       if (sep2 != str2)
+                               cmp = e_strcmp2n (country_code, 2, str2, sep2 - str2);
                } else if (sep2 == str2) {
                        cmp = e_strcmp2n (str1, sep1 - str1, country_code, 2);
                } else {


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