Monotone-Parent: 94ff9caef87cde7157655b9f398a4481c6bf5b72
Monotone-Revision: 93bb2c6945d08d009e60e0b6280976b86b0b0aaf Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-06-03T23:06:52 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
7737073752
commit
459ab3484e
12
ChangeLog
12
ChangeLog
|
@ -1,5 +1,17 @@
|
|||
2009-06-03 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* Main/NSException+Stacktrace.m, SOPE/NGCards/NGCardsSaxHandler.m,
|
||||
SOPE/NGCards/NSString+NGCards.m,
|
||||
SOPE/NGCards/versitCardsSaxDriver/VSSaxDriver.m,
|
||||
SoObjects/Appointments/SOGoAppointmentFolder.m,
|
||||
SoObjects/SOGo/NSArray+Utilities.m,
|
||||
SoObjects/SOGo/SOGoGCSFolder.m,
|
||||
SoObjects/SOGo/SOGoLDAPUserDefaults.m,
|
||||
UI/MailPartViewers/UIxMailPartTextViewer.m,
|
||||
UI/MainUI/SOGoUserHomePage.m, UI/Scheduler/UIxCalListingActions.m:
|
||||
replaced all invocations of "malloc", "realloc", "free" by similar
|
||||
invocations to NSZoneMalloc, NSZoneRealloc and NSZoneFree.
|
||||
|
||||
* SoObjects/Appointments/SOGoAppointmentFolder.m (+initialize):
|
||||
removed obsolete security declarations.
|
||||
(-davCalendarQuery, -davCalendarMultiget): delegate conversion of
|
||||
|
|
|
@ -235,7 +235,7 @@ _NSFoundationUncaughtExceptionHandler (NSException *exception)
|
|||
}
|
||||
if (_symbols)
|
||||
{
|
||||
objc_free (_symbols);
|
||||
NSZoneFree (NULL, _symbols);
|
||||
_symbols = NULL;
|
||||
}
|
||||
[super dealloc];
|
||||
|
@ -301,7 +301,7 @@ _NSFoundationUncaughtExceptionHandler (NSException *exception)
|
|||
[self release];
|
||||
return nil;
|
||||
}
|
||||
_symbols = objc_malloc (neededSpace);
|
||||
_symbols = NSZoneMalloc (NULL, neededSpace);
|
||||
if (!_symbols)
|
||||
{
|
||||
//NSLog (@"GSBinaryFileInfo: Can't allocate buffer");
|
||||
|
|
|
@ -219,8 +219,8 @@
|
|||
return contentValues;
|
||||
}
|
||||
|
||||
- (void) characters:(unichar *)_chars
|
||||
length:(int)_len
|
||||
- (void) characters: (unichar *) _chars
|
||||
length: (int) _len
|
||||
{
|
||||
if (_len && _chars)
|
||||
{
|
||||
|
@ -228,14 +228,16 @@
|
|||
{
|
||||
/* first content */
|
||||
contentLength = _len;
|
||||
content = calloc (_len + 1, sizeof(unichar));
|
||||
memcpy (content, _chars, (_len * sizeof(unichar)));
|
||||
content = NSZoneMalloc (NULL, (_len + 1) * sizeof (unichar));
|
||||
memcpy (content, _chars, (_len * sizeof (unichar)));
|
||||
*(content + _len) = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* increase content */
|
||||
content =
|
||||
realloc (content, (contentLength + _len+2) * sizeof(unichar));
|
||||
NSZoneRealloc (NULL, content,
|
||||
(contentLength + _len+2) * sizeof(unichar));
|
||||
memcpy (&(content[contentLength]), _chars,
|
||||
(_len * sizeof(unichar)));
|
||||
contentLength += _len;
|
||||
|
|
|
@ -295,7 +295,7 @@ static NSString *commaSeparator = nil;
|
|||
components = [NSMutableArray array];
|
||||
|
||||
length = [self length];
|
||||
stringBuffer = malloc (sizeof (unichar) * length);
|
||||
stringBuffer = NSZoneMalloc (NULL, sizeof (unichar) * length);
|
||||
[self getCharacters: stringBuffer];
|
||||
|
||||
currentRange = NSMakeRange(0, 0);
|
||||
|
@ -324,7 +324,7 @@ static NSString *commaSeparator = nil;
|
|||
[components
|
||||
addObject: [self substringWithRange: currentRange]];
|
||||
|
||||
free (stringBuffer);
|
||||
NSZoneFree (NULL, stringBuffer);
|
||||
|
||||
return components;
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@
|
|||
}
|
||||
|
||||
datalen = [_data length];
|
||||
data = calloc(datalen + 1, sizeof(unichar));
|
||||
data = NSZoneCalloc (NULL, datalen + 1, sizeof(unichar));
|
||||
[_data getCharacters: data range: NSMakeRange(0, datalen)];
|
||||
return self;
|
||||
}
|
||||
|
@ -119,7 +119,7 @@
|
|||
}
|
||||
|
||||
- (void) dealloc {
|
||||
if (data) free (data);
|
||||
if (data) NSZoneFree (NULL, data);
|
||||
[group release];
|
||||
[tagName release];
|
||||
[attrs release];
|
||||
|
|
|
@ -1104,7 +1104,8 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
|||
mgr = [SoSecurityManager sharedSecurityManager];
|
||||
|
||||
//c = [self objectClassForComponentName: [object objectForKey: @"c_component"]];
|
||||
sogoObject = [SOGoCalendarComponent objectWithRecord: object inContainer: self];
|
||||
sogoObject = [SOGoCalendarComponent objectWithRecord: object
|
||||
inContainer: self];
|
||||
[sogoObject setComponentTag: [object objectForKey: @"c_component"]];
|
||||
//sogoObject = [self _createChildComponentWithRecord: object];
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
unsigned int max;
|
||||
|
||||
max = [self count];
|
||||
pointers = malloc (sizeof(id) * (max + 1));
|
||||
pointers = NSZoneMalloc (NULL, sizeof(id) * (max + 1));
|
||||
[self getObjects: pointers];
|
||||
*(pointers + max) = nil;
|
||||
|
||||
|
|
|
@ -834,7 +834,7 @@ static NSArray *childRecordFields = nil;
|
|||
{
|
||||
aclsForObject = [NSMutableDictionary dictionary];
|
||||
[aclCache setObject: aclsForObject
|
||||
forKey: objectPath];
|
||||
forKey: objectPath];
|
||||
}
|
||||
if (roles)
|
||||
[aclsForObject setObject: roles forKey: uid];
|
||||
|
@ -871,13 +871,13 @@ static NSArray *childRecordFields = nil;
|
|||
// let's go get the system-wide defaults, if any.
|
||||
if (![acls count])
|
||||
{
|
||||
if ([[container nameInContainer] isEqualToString: @"Calendar"] ||
|
||||
[[container nameInContainer] isEqualToString: @"Contacts"])
|
||||
if ([[container nameInContainer] isEqualToString: @"Calendar"]
|
||||
|| [[container nameInContainer] isEqualToString: @"Contacts"])
|
||||
acls = [[NSUserDefaults standardUserDefaults]
|
||||
objectForKey: [NSString stringWithFormat: @"SOGo%@DefaultRoles",
|
||||
[container nameInContainer]]];
|
||||
}
|
||||
|
||||
|
||||
return acls;
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ _createAtom (_SOGoLDAPValueType type, void *value)
|
|||
{
|
||||
_SOGoLDAPValue *newAtom;
|
||||
|
||||
newAtom = malloc (sizeof (_SOGoLDAPValue));
|
||||
newAtom = NSZoneMalloc (NULL, sizeof (_SOGoLDAPValue));
|
||||
newAtom->type = type;
|
||||
newAtom->value = value;
|
||||
newAtom->maxCount = 0;
|
||||
|
@ -72,7 +72,8 @@ _createContainer (_SOGoLDAPValueType type)
|
|||
_SOGoLDAPValue *newContainer;
|
||||
_SOGoLDAPValue **array;
|
||||
|
||||
array = malloc (sizeof (_SOGoLDAPValue *) * SOGoLDAPContainerSize);
|
||||
array = NSZoneMalloc (NULL,
|
||||
sizeof (_SOGoLDAPValue *) * SOGoLDAPContainerSize);
|
||||
*array = NULL;
|
||||
newContainer = _createAtom (type, array);
|
||||
newContainer->maxCount = SOGoLDAPContainerSize - 1; /* all values + NULL */
|
||||
|
@ -95,8 +96,9 @@ _appendAtomToContainer (_SOGoLDAPValue *atom, _SOGoLDAPValue *container)
|
|||
if (count >= container->maxCount)
|
||||
{
|
||||
container->maxCount += SOGoLDAPContainerSize;
|
||||
container->value = realloc (container->value, (container->maxCount + 1)
|
||||
* sizeof (_SOGoLDAPValue *));
|
||||
container->value = NSZoneRealloc (NULL, container->value,
|
||||
(container->maxCount + 1)
|
||||
* sizeof (_SOGoLDAPValue *));
|
||||
currentAtom = (_SOGoLDAPValue **) container->value + count;
|
||||
}
|
||||
|
||||
|
@ -149,7 +151,7 @@ _appendAtomToDictionary (_SOGoLDAPValue *atom, _SOGoLDAPValue *dictionary)
|
|||
|
||||
if (container->type == SOGoLDAPArray)
|
||||
{
|
||||
free (atom->key);
|
||||
NSZoneFree (NULL, atom->key);
|
||||
atom->key = NULL;
|
||||
}
|
||||
_appendAtomToContainer (atom, container);
|
||||
|
@ -170,7 +172,8 @@ _fetchLDAPDNAndAttrWithHandle (const char *dn, char *attrs[], LDAP *ldapHandle)
|
|||
_SOGoLDAPValue **atoms, **currentAtom;
|
||||
unsigned int atomsCount;
|
||||
|
||||
atoms = malloc (SOGoLDAPContainerSize * sizeof (_SOGoLDAPValue *));
|
||||
atoms = NSZoneMalloc (NULL,
|
||||
SOGoLDAPContainerSize * sizeof (_SOGoLDAPValue *));
|
||||
currentAtom = atoms;
|
||||
atomsCount = 0;
|
||||
|
||||
|
@ -204,10 +207,10 @@ _fetchLDAPDNAndAttrWithHandle (const char *dn, char *attrs[], LDAP *ldapHandle)
|
|||
|
||||
if (!(atomsCount % SOGoLDAPContainerSize))
|
||||
{
|
||||
atoms = realloc (atoms, (int)
|
||||
(SOGoLDAPContainerSize + atomsCount)
|
||||
* sizeof (_SOGoLDAPValue *));
|
||||
|
||||
atoms = NSZoneRealloc (NULL, atoms,
|
||||
(int) (SOGoLDAPContainerSizee
|
||||
+ atomsCount)
|
||||
* sizeof (_SOGoLDAPValue *));
|
||||
currentAtom = atoms + atomsCount;
|
||||
}
|
||||
value++;
|
||||
|
@ -255,7 +258,7 @@ _readLDAPAttrRefWithHandle (const char *attrPair, LDAP *ldapHandle)
|
|||
attrs[1] = NULL;
|
||||
atoms = _fetchLDAPDNAndAttrWithHandle (dn, attrs, ldapHandle);
|
||||
refValue = *atoms;
|
||||
free (attrs[0]);
|
||||
NSZoneFree (NULL, attrs[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -263,8 +266,8 @@ _readLDAPAttrRefWithHandle (const char *attrPair, LDAP *ldapHandle)
|
|||
atoms = _fetchLDAPDNAndAttrWithHandle (dn, NULL, ldapHandle);
|
||||
_fillLDAPDictionaryWithAtoms (refValue, atoms);
|
||||
}
|
||||
free (atoms);
|
||||
free (dn);
|
||||
NSZoneFree (NULL, atoms);
|
||||
NSZoneFree (NULL, dn);
|
||||
|
||||
return refValue;
|
||||
}
|
||||
|
@ -378,7 +381,7 @@ _initLDAPDefaults ()
|
|||
{
|
||||
atoms = _fetchLDAPDNAndAttrWithHandle (configDN, NULL, ldapHandle);
|
||||
_fillLDAPDictionaryWithAtoms (dictionary, atoms);
|
||||
free (atoms);
|
||||
NSZoneFree (NULL, atoms);
|
||||
}
|
||||
|
||||
return dictionary;
|
||||
|
|
|
@ -55,7 +55,7 @@ convertChars (const char *oldString, unsigned int oldLength,
|
|||
unsigned int length, maxLength;
|
||||
|
||||
maxLength = oldLength + paddingBuffer;
|
||||
newString = malloc (maxLength + 1);
|
||||
newString = NSZoneMalloc (NULL, maxLength + 1);
|
||||
destChar = newString;
|
||||
currentChar = oldString;
|
||||
|
||||
|
@ -72,7 +72,7 @@ convertChars (const char *oldString, unsigned int oldLength,
|
|||
if (length + paddingBuffer > maxLength - 6)
|
||||
{
|
||||
maxLength += paddingBuffer;
|
||||
reallocated = realloc (newString, maxLength + 1);
|
||||
reallocated = NSZoneRealloc (NULL, newString, maxLength + 1);
|
||||
if (reallocated)
|
||||
{
|
||||
newString = reallocated;
|
||||
|
@ -112,7 +112,7 @@ convertChars (const char *oldString, unsigned int oldLength,
|
|||
length: newLength
|
||||
encoding: NSUTF8StringEncoding];
|
||||
[convertedString autorelease];
|
||||
free (newString);
|
||||
NSZoneFree (NULL, newString);
|
||||
|
||||
return convertedString;
|
||||
}
|
||||
|
|
|
@ -183,7 +183,7 @@ static NSString *LDAPContactInfoAttribute = nil;
|
|||
|
||||
interval = [endDate timeIntervalSinceDate: startDate] + 60;
|
||||
intervals = interval / intervalSeconds; /* slices of 15 minutes */
|
||||
freeBusyItems = calloc (intervals, sizeof (int));
|
||||
freeBusyItems = NSZoneCalloc (NULL, intervals, sizeof (int));
|
||||
[self _fillFreeBusyItems: freeBusyItems count: intervals
|
||||
withRecords: [fb fetchFreeBusyInfosFrom: startDate to: endDate]
|
||||
fromStartDate: startDate toEndDate: endDate];
|
||||
|
@ -192,7 +192,7 @@ static NSString *LDAPContactInfoAttribute = nil;
|
|||
for (count = 0; count < intervals; count++)
|
||||
[response appendFormat: @"%d,", *(freeBusyItems + count)];
|
||||
[response deleteCharactersInRange: NSMakeRange (intervals * 2 - 1, 1)];
|
||||
free (freeBusyItems);
|
||||
NSZoneFree (NULL, freeBusyItems);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
|
|
@ -761,7 +761,7 @@ _computeBlockPosition (NSArray *block)
|
|||
max = [block count];
|
||||
event = [block objectAtIndex: 0];
|
||||
siblings = [[event objectForKey: @"siblings"] unsignedIntValue];
|
||||
positions = calloc (siblings, sizeof (NSMutableDictionary *));
|
||||
positions = NSZoneCalloc (NULL, siblings, sizeof (NSMutableDictionary *));
|
||||
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
|
@ -780,7 +780,7 @@ _computeBlockPosition (NSArray *block)
|
|||
}
|
||||
}
|
||||
|
||||
free (positions);
|
||||
NSZoneFree (NULL, positions);
|
||||
}
|
||||
|
||||
// static inline void
|
||||
|
@ -831,7 +831,7 @@ _computeBlocksPosition (NSArray *blocks)
|
|||
block = [blocks objectAtIndex: count];
|
||||
_computeBlockPosition (block);
|
||||
// _addBlockMultipliers (block, positions);
|
||||
// free (positions);
|
||||
// NSZoneFree (NULL, positions);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue