Fixed bug, -j option produced duplicate error messages.

This commit is contained in:
Reijo Tomperi 2009-03-01 19:34:32 +00:00
parent d098b62975
commit 6495912d9a
2 changed files with 10 additions and 1 deletions

View File

@ -71,8 +71,15 @@ bool ThreadExecutor::handleRead(unsigned int &result)
{
ErrorLogger::ErrorMessage msg;
msg.deserialize(buf);
// Alert only about unique errors
std::string errmsg = msg.toText();
if (std::find(_errorList.begin(), _errorList.end(), errmsg) == _errorList.end())
{
_errorList.push_back(errmsg);
_errorLogger.reportErr(msg);
}
}
else if (type == '3')
{
_fileCount++;

View File

@ -22,6 +22,7 @@
#include <vector>
#include <string>
#include <list>
#include "settings.h"
#include "errorlogger.h"
@ -50,6 +51,7 @@ private:
bool handleRead(unsigned int &result);
void writeToPipe(char type, const std::string &data);
int _pipe[2];
std::list<std::string> _errorList;
public:
/**
* @return true if support for threads exist.