(fix) also try to get event using its UID before bailing out
parent
4084375003
commit
aca2c1b9e8
|
@ -152,7 +152,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
processIdentifierInCache = [[self globalMetadataForDevice] objectForKey: key];
|
processIdentifierInCache = [[self globalMetadataForDevice] objectForKey: key];
|
||||||
|
|
||||||
// Don't update the cache if another request is processing the same collection.
|
// Don't update the cache if another request is processing the same collection.
|
||||||
// I case of a merged folder we have to check personal folder's lock.
|
// In case of a merged folder we have to check personal folder's lock.
|
||||||
a = [key componentsSeparatedByString: @"/"];
|
a = [key componentsSeparatedByString: @"/"];
|
||||||
pkey = [NSString stringWithFormat: @"%@/personal", [a objectAtIndex:0]];
|
pkey = [NSString stringWithFormat: @"%@/personal", [a objectAtIndex:0]];
|
||||||
|
|
||||||
|
|
|
@ -271,6 +271,39 @@ void handle_eas_terminate(int signum)
|
||||||
return theIdToTranslate;
|
return theIdToTranslate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
- (SOGoAppointmentObject *) _eventObjectWithUID: (NSString *) uid
|
||||||
|
{
|
||||||
|
SOGoAppointmentFolder *folder;
|
||||||
|
SOGoAppointmentObject *eventObject;
|
||||||
|
NSArray *folders;
|
||||||
|
NSEnumerator *e;
|
||||||
|
NSString *cname;
|
||||||
|
|
||||||
|
eventObject = nil;
|
||||||
|
|
||||||
|
folders = [[[context activeUser] calendarsFolderInContext: context] subFolders];
|
||||||
|
e = [folders objectEnumerator];
|
||||||
|
while (eventObject == nil && (folder = [e nextObject]))
|
||||||
|
{
|
||||||
|
cname = [folder resourceNameForEventUID: uid];
|
||||||
|
if (cname)
|
||||||
|
{
|
||||||
|
eventObject = [folder lookupName: cname inContext: context
|
||||||
|
acquire: NO];
|
||||||
|
if ([eventObject isKindOfClass: [NSException class]])
|
||||||
|
eventObject = nil;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (eventObject)
|
||||||
|
return eventObject;
|
||||||
|
else
|
||||||
|
return [NSException exceptionWithHTTPStatus:404 /* Not Found */];
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
@ -1822,6 +1855,9 @@ void handle_eas_terminate(int signum)
|
||||||
inContext: context
|
inContext: context
|
||||||
acquire: NO];
|
acquire: NO];
|
||||||
|
|
||||||
|
if ([appointmentObject isKindOfClass: [NSException class]])
|
||||||
|
appointmentObject = [self _eventObjectWithUID:[event uid]];
|
||||||
|
|
||||||
// Create the appointment if it is not added to calendar yet
|
// Create the appointment if it is not added to calendar yet
|
||||||
if ([appointmentObject isKindOfClass: [NSException class]])
|
if ([appointmentObject isKindOfClass: [NSException class]])
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue