From 194c415631f97e8e85687df97c01bb4025c01661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Garc=C3=ADa=20S=C3=A1ez?= Date: Mon, 9 Nov 2015 19:55:55 +0100 Subject: [PATCH 1/2] Log an error for SOGoObject without wocontext --- SoObjects/SOGo/SOGoObject.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SoObjects/SOGo/SOGoObject.m b/SoObjects/SOGo/SOGoObject.m index 3f3afcb9b..df5bc6afc 100644 --- a/SoObjects/SOGo/SOGoObject.m +++ b/SoObjects/SOGo/SOGoObject.m @@ -180,6 +180,9 @@ [NSException raise: NSInvalidArgumentException format: @"'_name' must not be an empty string"]; context = [[WOApplication application] context]; + if (!context) + [self errorWithFormat: @"Error: initializing a SOGoObject (named %@) " + @"without wocontext", _name]; nameInContainer = [_name copy]; container = _container; if ([self doesRetainContainer]) From 5f5b5d9273ef2448007957b182efe7df3a6bff0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Garc=C3=ADa=20S=C3=A1ez?= Date: Mon, 9 Nov 2015 19:39:54 +0100 Subject: [PATCH 2/2] oc: activate user context on initialization (for real) Even with cached ones (completes cfab18e1b845bf24ac896014bce4d61a46f44fde) --- OpenChange/MAPIStoreUserContext.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OpenChange/MAPIStoreUserContext.m b/OpenChange/MAPIStoreUserContext.m index bc91f56b0..de3dfadf1 100644 --- a/OpenChange/MAPIStoreUserContext.m +++ b/OpenChange/MAPIStoreUserContext.m @@ -73,6 +73,8 @@ static NSMapTable *contextsTable = nil; [userContext autorelease]; [contextsTable setObject: userContext forKey: username]; } + else + [userContext activate]; return userContext; }