mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-08 13:05:28 +00:00
Monotone-Parent: cb5283601b9539bb382aa64a739bf758b9e2ac7f
Monotone-Revision: e064a5558d641325b03001de47cede6db61eed32 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-10-03T20:55:02 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -220,8 +220,8 @@ MAPIStoreMappingTDBTraverse (TDB_CONTEXT *ctx, TDB_DATA data1, TDB_DATA data2,
|
||||
[mapping setObject: urlString forKey: idKey];
|
||||
[reverseMapping setObject: idKey forKey: urlString];
|
||||
rc = YES;
|
||||
// [self logWithFormat: @"registered url '%@' with id %lld (0x%.16"PRIx64")",
|
||||
// urlString, idNbr, idNbr];
|
||||
[self logWithFormat: @"registered url '%@' with id %lld (0x%.16"PRIx64")",
|
||||
urlString, idNbr, idNbr];
|
||||
|
||||
/* Add the record given its fid and mapistore_uri */
|
||||
key.dptr = (unsigned char *) talloc_asprintf(NULL, "0x%.16"PRIx64, idNbr);
|
||||
@@ -245,18 +245,20 @@ MAPIStoreMappingTDBTraverse (TDB_CONTEXT *ctx, TDB_DATA data1, TDB_DATA data2,
|
||||
|
||||
idKey = [NSNumber numberWithUnsignedLongLong: idNbr];
|
||||
urlString = [mapping objectForKey: idKey];
|
||||
[reverseMapping removeObjectForKey: urlString];
|
||||
[mapping removeObjectForKey: idKey];
|
||||
if (urlString)
|
||||
{
|
||||
[self logWithFormat: @"unregistering url '%@' with id %lld (0x%.16"PRIx64")",
|
||||
urlString, idNbr, idNbr];
|
||||
[reverseMapping removeObjectForKey: urlString];
|
||||
[mapping removeObjectForKey: idKey];
|
||||
|
||||
/* We hard-delete the entry from the indexing database */
|
||||
key.dptr = (unsigned char *) talloc_asprintf(NULL, "0x%.16"PRIx64, idNbr);
|
||||
key.dsize = strlen((const char *) key.dptr);
|
||||
/* We hard-delete the entry from the indexing database */
|
||||
key.dptr = (unsigned char *) talloc_asprintf(NULL, "0x%.16"PRIx64, idNbr);
|
||||
key.dsize = strlen((const char *) key.dptr);
|
||||
|
||||
tdb_delete(indexing->tdb, key);
|
||||
talloc_free(key.dptr);
|
||||
|
||||
// [self logWithFormat: @"unregistered url '%@' with id %lld (0x%.16"PRIx64")",
|
||||
// urlString, idNbr, idNbr];
|
||||
tdb_delete(indexing->tdb, key);
|
||||
talloc_free(key.dptr);
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user