diff --git a/ActiveSync/iCalEvent+ActiveSync.m b/ActiveSync/iCalEvent+ActiveSync.m index d1a4b6f8a..586bf5798 100644 --- a/ActiveSync/iCalEvent+ActiveSync.m +++ b/ActiveSync/iCalEvent+ActiveSync.m @@ -40,6 +40,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #import #import #import +#import #import #import @@ -274,11 +275,20 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // It is very important here to NOT set 0 in the response, // otherwise it'll prevent WP8 phones from sync'ing. See #3028 for details. o = [o activeSyncRepresentationInContext: context]; - [s appendString: @""]; - [s appendFormat: @"%d", 1]; - [s appendFormat: @"%d", [o length]]; - [s appendFormat: @"%@", o]; - [s appendString: @""]; + + if ([[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"2.5"]) + { + [s appendFormat: @"%@", o]; + [s appendString: @"0"]; + } + else + { + [s appendString: @""]; + [s appendFormat: @"%d", 1]; + [s appendFormat: @"%d", [o length]]; + [s appendFormat: @"%@", o]; + [s appendString: @""]; + } } [s appendFormat: @"%d", 1]; @@ -394,9 +404,17 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. } // FIXME: merge with iCalToDo - if ((o = [[theValues objectForKey: @"Body"] objectForKey: @"Data"])) - [self setComment: o]; - + if ([[[context request] headerForKey: @"MS-ASProtocolVersion"] isEqualToString: @"2.5"]) + { + if ((o = [theValues objectForKey: @"Body"])) + [self setComment: o]; + } + else + { + if ((o = [[theValues objectForKey: @"Body"] objectForKey: @"Data"])) + [self setComment: o]; + } + if ((o = [theValues objectForKey: @"Location"])) [self setLocation: o]; diff --git a/NEWS b/NEWS index 71955f765..a20444205 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,7 @@ Bug fixes - fixed empty sync responses for EAS 2.5 and 12.0 clients - use the correct mail body element for EAS 2.5 clients - fixed tasks disappearing issue with RoadSync + - use the correct body element for events for EAS 2.5 clients 2.2.16 (2015-02-12) -------------------