the missing filter detection code was broken

This commit is contained in:
Jean-Francois Dockes 2012-10-23 19:40:51 +02:00
parent 0e74a7061a
commit c9e271ed99

View file

@ -483,21 +483,23 @@ TempFile FileInterner::dataToTempFile(const string& dt, const string& mt)
} }
// See if the error string is formatted as a missing helper message, // See if the error string is formatted as a missing helper message,
// accumulate helper name if it is // accumulate helper name if it is. The format of the message is:
// RECFILTERROR HELPERNOTFOUND program1 [program2 ...]
void FileInterner::checkExternalMissing(const string& msg, const string& mt) void FileInterner::checkExternalMissing(const string& msg, const string& mt)
{ {
LOGDEB2(("checkExternalMissing: [%s]\n", msg.c_str()));
if (m_missingdatap && msg.find("RECFILTERROR") == 0) { if (m_missingdatap && msg.find("RECFILTERROR") == 0) {
vector<string> lerr; vector<string> verr;
stringToStrings(msg, lerr); stringToStrings(msg, verr);
if (lerr.size() > 2) { if (verr.size() > 2) {
vector<string>::iterator it = lerr.begin(); vector<string>::iterator it = verr.begin();
lerr.erase(it++); it++;
if (*it == "HELPERNOTFOUND") { if (*it == "HELPERNOTFOUND") {
lerr.erase(it++); it++;
string s; for (; it < verr.end(); it++) {
stringsToString(lerr, s); m_missingdatap->m_missingExternal.insert(*it);
m_missingdatap->m_missingExternal.insert(s); m_missingdatap->m_typesForMissing[*it].insert(mt);
m_missingdatap->m_typesForMissing[s].insert(mt); }
} }
} }
} }