Debugging output for subscription issue

pull/241/head
Francis Lachapelle 2018-05-18 11:15:13 -04:00
parent e6508e77a9
commit a0582c7e1e
2 changed files with 17 additions and 3 deletions

View File

@ -282,6 +282,11 @@ static NSArray *childRecordFields = nil;
else else
name = primaryDN; name = primaryDN;
} }
else
{
[self errorWithFormat: @"(%s): No c_foldername defined (%@)",
__PRETTY_FUNCTION__, [container defaultFolderName]];
}
return name; return name;
} }
@ -342,7 +347,12 @@ static NSArray *childRecordFields = nil;
[fc cancelFetch]; [fc cancelFetch];
[cm releaseChannel: fc]; [cm releaseChannel: fc];
} }
NS_HANDLER; NS_HANDLER
{
[self errorWithFormat: @"(%s): Could not fetch c_foldername from %@ for c_path %@",
__PRETTY_FUNCTION__, [folderLocation gcsTableName], ocsPath];
[self errorWithFormat: @"%@", localException];
}
NS_ENDHANDLER; NS_ENDHANDLER;
} }
@ -439,7 +449,11 @@ static NSArray *childRecordFields = nil;
record = [[self folderManager] recordAtPath: _path]; record = [[self folderManager] recordAtPath: _path];
if (!record) if (!record)
return nil; {
[self errorWithFormat: @"(%s): Can't find record at path %@",
__PRETTY_FUNCTION__, _path];
return nil;
}
[cache setValue: [record jsonRepresentation] forKey: _path]; [cache setValue: [record jsonRepresentation] forKey: _path];
} }

View File

@ -289,7 +289,7 @@ static SoSecurityManager *sm = nil;
// We check with -ocsFolderForPath if the folder also exists in the database. // We check with -ocsFolderForPath if the folder also exists in the database.
// This is important because user A could delete folder X, and user B has subscribed to it. // This is important because user A could delete folder X, and user B has subscribed to it.
// If the "default roles" are enabled for calendars/address books, -validatePersmission:.. will // If the "default roles" are enabled for calendars/address books, -validatePermission:.. will
// work (grabbing the default role) and the deleted resource will be incorrectly returned. // work (grabbing the default role) and the deleted resource will be incorrectly returned.
if (subscribedFolder if (subscribedFolder
&& [subscribedFolder ocsFolderForPath: [subscribedFolder ocsPath]] && [subscribedFolder ocsFolderForPath: [subscribedFolder ocsPath]]