From 81997a8c8a9add2c64da9e9cbb529b04351df430 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 19 Nov 2009 16:53:51 +0000 Subject: [PATCH] Monotone-Parent: 72e1b73ecd70270e80d3a060fabe219cfcdd21cd Monotone-Revision: 9f8af75f69269845084162a8844a51cf065ae8fc Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-11-19T16:53:51 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++++ SoObjects/SOGo/SOGoParentFolder.m | 12 +++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) 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]];