Fixed bug, -j option produced duplicate error messages.
This commit is contained in:
parent
d098b62975
commit
6495912d9a
|
@ -71,7 +71,14 @@ bool ThreadExecutor::handleRead(unsigned int &result)
|
|||
{
|
||||
ErrorLogger::ErrorMessage msg;
|
||||
msg.deserialize(buf);
|
||||
_errorLogger.reportErr(msg);
|
||||
|
||||
// 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')
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue