Permalink
Browse files

MountTray: Make sure the devd watcher is not started until after the …

…initial scan has finished. This should prevent crashes where two re-scans try to run at the same time and trample each other.
  • Loading branch information...
1 parent 269e8ee commit e6c1b6cb92cc1858453fb37ab0695da7e45bb909 Ken Moore committed Nov 20, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 src-qt4/pc-mounttray/mountTray.cpp
View
8 src-qt4/pc-mounttray/mountTray.cpp
@@ -49,17 +49,17 @@ void MountTray::programInit()
trayIcon->setIcon(QIcon(":icons/CDdevices-inactive.png"));
trayIcon->show();
+ //Do an initial scan of the devices with dmesg
+ qDebug() << "-Performing initial device scan";
+ scanInitialDevices();
+
//Startup the devd watching process
qDebug() << "-Starting up the DEVD watcher";
devdTimer = new QTimer();
devdTimer->setSingleShot(TRUE);
connect(devdTimer,SIGNAL(timeout()),this,SLOT(slotDevChanges()));
startupDevdProc();
- //Do an initial scan of the devices with dmesg
- qDebug() << "-Performing initial device scan";
- scanInitialDevices();
-
//Start up the filesystem watcher
diskWatcher = new FSWatcher();
connect(diskWatcher,SIGNAL(FSWarning(QString,QString)),this,SLOT(slotDisplayWarning(QString,QString)));

0 comments on commit e6c1b6c

Please sign in to comment.