adium/adium

Fix two issues in the log viewer:
adium-1.5.2
2012-06-20, Thijs Alkemade
82f8f5b935a4
Fix two issues in the log viewer:

- Fix a race condition between the flushing and releasing of the index when the window is closed and the flushing by the indexer, by making sure -_cleanDirtyLogs retains its index and enters the closing group. This caused a crash.
- Fix an issue where _remainingLogs gets out of sync with the number of logs still in localLogSet when the log fails to parse. This caused an infinite loop and stopped the indexing from ever finishing.


Fixes #15984
/*
* Adium is the legal property of its developers, whose names are listed in the copyright file included
* with this source distribution.
*
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU
* General Public License as published by the Free Software Foundation; either version 2 of the License,
* or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program; if not,
* write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifdef __OBJC__
#import <Cocoa/Cocoa.h> //Everybody needs cocoa
#import <Adium/AISharedAdium.h> //Everybody needs the core
#import <Adium/ESDebugAILog.h> //Everybody needs to debug
#import <AIUtilities/AIStringUtilities.h> //Everybody should be localizing their strings
#import <Adium/AILocalizationAssistance.h> //Everybody should be localizing their strings
#import <Adium/AIPreferenceControllerProtocol.h> //Just about everyone needs prefs
#import <Adium/AIPlugin.h> //We use plugins for almost everything
#endif
#include <AIUtilities/AIMathCompatibility.h>