diff --git a/ChangeLog b/ChangeLog index 57edff873..56bcbe9a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-11-19 Wolfgang Sourdeau + * SoObjects/SOGo/SOGoParentFolder.m (-subFolders): we raise the + exceptions we get only if the current request is a PROPFIND. This + avoids a useless restart of SOGo when the database is down during + the execution of other requests. + * Tools/sogo-tool.m (main): we now check that the SOGo configuration is valid and consequently that the tool runs under the same account as SOGo. diff --git a/SoObjects/SOGo/SOGoParentFolder.m b/SoObjects/SOGo/SOGoParentFolder.m index 26504d199..69c161c08 100644 --- a/SoObjects/SOGo/SOGoParentFolder.m +++ b/SoObjects/SOGo/SOGoParentFolder.m @@ -30,6 +30,7 @@ #import #import #import +#import #import #import #import @@ -422,9 +423,14 @@ static SoSecurityManager *sm = nil; { NSMutableArray *ma; NSException *error; + NSString *requestMethod; + BOOL isPropfind; + + requestMethod = [[context request] method]; + isPropfind = [requestMethod isEqualToString: @"PROPFIND"]; error = [self initSubFolders]; - if (error) + if (error && isPropfind) { /* We exceptionnally raise the exception here because doPROPFIND: will not care for errors in its response from @@ -432,9 +438,9 @@ static SoSecurityManager *sm = nil; disappearance of user folders in the SOGo extensions. */ [error raise]; } - + error = [self initSubscribedSubFolders]; - if (error) + if (error && isPropfind) [error raise]; ma = [NSMutableArray arrayWithArray: [subFolders allValues]];