From 6fe1be45cd84706357c8cf13764ad7b5ff223558 Mon Sep 17 00:00:00 2001 From: Chenthill Palanisamy Date: Wed, 15 Nov 2006 05:49:49 +0000 Subject: Fixes #207960. --- servers/exchange/ChangeLog | 7 +++++++ servers/exchange/lib/e2k-context.c | 12 ++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/servers/exchange/ChangeLog b/servers/exchange/ChangeLog index 14dbd9693..bfa945371 100644 --- a/servers/exchange/ChangeLog +++ b/servers/exchange/ChangeLog @@ -1,3 +1,10 @@ +2006-11-07 Chenthill Palanisamy + + Fixes the removal of properties. + * lib/e2k-context.c: (write_prop): Do not check for the + existance of the value while removing the properties. + Fixes #207960 (buzilla.novell.com) + 2006-10-12 Srinivasa Ragavan ** Fix for #bug 347811 diff --git a/servers/exchange/lib/e2k-context.c b/servers/exchange/lib/e2k-context.c index 8a998fb04..5559798d0 100644 --- a/servers/exchange/lib/e2k-context.c +++ b/servers/exchange/lib/e2k-context.c @@ -1241,19 +1241,23 @@ write_prop (GString *xml, const char *propertyname, GPtrArray *array; int i; - if (value == NULL) + if (set && (value == NULL)) return; + namespace = e2k_prop_namespace_name (propertyname); abbrev = e2k_prop_namespace_abbrev (propertyname); name = e2k_prop_property_name (propertyname); - need_type = (strstr (namespace, "/mapi/id/") != NULL); - g_string_append_printf (xml, "<%c:%s", abbrev, name); if (!set) { + /* This means we are removing the property, so just return + with ending tag */ g_string_append (xml, "/>"); return; - } else if (!need_type) + } + + need_type = (strstr (namespace, "/mapi/id/") != NULL); + if (!need_type) g_string_append_c (xml, '>'); switch (type) { -- cgit v1.2.1