[evolution-ews] I#19 - Country is forgotten along the way to exchange server



commit 4448e7bbdb930d1f751a18ae3c7132b54ae63d46
Author: Milan Crha <mcrha redhat com>
Date:   Wed Sep 26 15:13:41 2018 +0200

    I#19 - Country is forgotten along the way to exchange server
    
    Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/19

 src/addressbook/e-book-backend-ews.c | 3 +++
 src/server/e-ews-item.c              | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/addressbook/e-book-backend-ews.c b/src/addressbook/e-book-backend-ews.c
index ff4c96d1..4bb2c42b 100644
--- a/src/addressbook/e-book-backend-ews.c
+++ b/src/addressbook/e-book-backend-ews.c
@@ -849,6 +849,7 @@ add_physical_address (ESoapMessage *msg,
        e_ews_message_write_string_parameter (msg, "Street", NULL, contact_addr->street);
        e_ews_message_write_string_parameter (msg, "City", NULL, contact_addr->locality);
        e_ews_message_write_string_parameter (msg, "State", NULL, contact_addr->region);
+       e_ews_message_write_string_parameter (msg, "CountryOrRegion", NULL, contact_addr->country);
        e_ews_message_write_string_parameter (msg, "PostalCode", NULL, contact_addr->code);
 
        e_soap_message_end_element (msg);
@@ -1340,6 +1341,8 @@ compare_address (ESoapMessage *message,
                convert_indexed_contact_property_to_updatexml_physical_address (message, "PhysicalAddress", 
"City", new_address->locality, "contacts", "PhysicalAddresses", key);
        if (set || g_strcmp0 (new_address->region, old_address->region) != 0)
                convert_indexed_contact_property_to_updatexml_physical_address (message, "PhysicalAddress", 
"State", new_address->region, "contacts", "PhysicalAddresses", key);
+       if (set || g_strcmp0 (new_address->country, old_address->country) != 0)
+               convert_indexed_contact_property_to_updatexml_physical_address (message, "PhysicalAddress", 
"CountryOrRegion", new_address->country, "contacts", "PhysicalAddresses", key);
        if (set || g_strcmp0 (new_address->code, old_address->code) != 0)
                convert_indexed_contact_property_to_updatexml_physical_address (message, "PhysicalAddress", 
"PostalCode", new_address->code, "contacts", "PhysicalAddresses", key);
 
diff --git a/src/server/e-ews-item.c b/src/server/e-ews-item.c
index b0ac50b7..6ba5975f 100644
--- a/src/server/e-ews-item.c
+++ b/src/server/e-ews-item.c
@@ -726,7 +726,7 @@ ews_get_physical_address (ESoapParameter *param)
        if (subparam)
                address->state = e_soap_parameter_get_string_value (subparam);
 
-       subparam = e_soap_parameter_get_first_child_by_name (param, "Country");
+       subparam = e_soap_parameter_get_first_child_by_name (param, "CountryOrRegion");
        if (subparam)
                address->country = e_soap_parameter_get_string_value (subparam);
 


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