adium/adium

Don't flush inside this lock. The lock is acquired on the main thread to cancel a search, and flushing can take a looong time.
--- a/Source/AILogViewerWindowController.m Sat Feb 11 00:48:52 2012 +0100
+++ b/Source/AILogViewerWindowController.m Sat Feb 11 00:51:32 2012 +0100
@@ -1575,15 +1575,16 @@
[wildcardedSearchString appendFormat:@"%@ ", searchComponent];
}
- AILogWithSignature(@"Calling flush");
- SKIndexFlush(logSearchIndex);
- AILogWithSignature(@"Done flushing. Now we can search.");
thisSearch = SKSearchCreate(logSearchIndex,
(CFStringRef)wildcardedSearchString,
kSKSearchOptionDefault);
currentSearch = (thisSearch ? (SKSearchRef)CFRetain(thisSearch) : NULL);
[currentSearchLock unlock];
+ AILogWithSignature(@"Calling flush");
+ SKIndexFlush(logSearchIndex);
+ AILogWithSignature(@"Done flushing. Now we can search.");
+
//Retrieve matches as long as more are pending
while (more && currentSearch) {
#define BATCH_NUMBER 100