This instance will be upgraded to Heptapod 0.20.1 on 2020-03-08 at 14:00 UTC+1 (10 minutes of downtime)

Commit 97a82aae authored by Gleb Popov's avatar Gleb Popov

Make DevdThread skip events for devices with '/' in their name. This fixes a crash

when MEDIACHANGE events are passed to ObjectManager, but there is no block associated.
parent bd18c3381fe4
......@@ -56,6 +56,10 @@ void DevdThread::parseLine(QString line)
QString devArg = data["cdev"].trimmed();
// don't do anything with stuff like diskid/blabla
if (devArg.contains('/'))
return;
if (QCoreApplication::arguments().contains("--debug-devd"))
qDebug() << "devd message: " << data;
......
......@@ -81,10 +81,6 @@ void ObjectManager::addBlock(QString dev)
return;
}
// don't do anything with stuff like diskid/blabla
if(dev.contains('/'))
return;
Q_ASSERT(!m_blockObjects.contains(dev));
qDebug() << "Created block " << dev;
......@@ -121,10 +117,6 @@ void ObjectManager::removeBlock(QString dev)
return;
}
// don't do anything with stuff like diskid/blabla
if(dev.contains('/'))
return;
// happens with partitions blocks - we delete them along with table block,
// but the devd event may arrive after that
if(!m_blockObjects.contains(dev))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment