mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-18 13:05:57 +00:00
(fix) avoid generating invalid response if mail isn't found
This commit is contained in:
@@ -2940,17 +2940,15 @@ void handle_eas_terminate(int signum)
|
||||
for (i = 0; i < total; i++)
|
||||
{
|
||||
itemId = [[sortedUIDs objectAtIndex: i] stringValue];
|
||||
|
||||
[s appendString: @"<Result xmlns=\"Search:\">"];
|
||||
[s appendFormat: @"<LongId>%@+%@</LongId>", folderId, itemId];
|
||||
[s appendFormat: @"<CollectionId xmlns=\"AirSyncBase:\">%@</CollectionId>", folderId];
|
||||
[s appendString: @"<Properties>"];
|
||||
|
||||
mailObject = [currentFolder lookupName: itemId inContext: context acquire: NO];
|
||||
|
||||
if ([mailObject isKindOfClass: [NSException class]])
|
||||
continue;
|
||||
|
||||
[s appendString: @"<Result xmlns=\"Search:\">"];
|
||||
[s appendFormat: @"<LongId>%@+%@</LongId>", folderId, itemId];
|
||||
[s appendFormat: @"<CollectionId xmlns=\"AirSyncBase:\">%@</CollectionId>", folderId];
|
||||
[s appendString: @"<Properties>"];
|
||||
[s appendFormat: [mailObject activeSyncRepresentationInContext: context]];
|
||||
[s appendString: @"</Properties>"];
|
||||
[s appendFormat: @"</Result>"];
|
||||
|
||||
Reference in New Issue
Block a user