diff options
author | Javier <dev.git@javispedro.com> | 2015-06-14 19:12:46 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2015-06-14 19:12:46 +0200 |
commit | 695a146f6e1e923b599ea140f934cbe97b483858 (patch) | |
tree | 58c65d9165cf8253c08a879764b3bcbdc3517570 | |
parent | 8f96d8d5edc98fc1b7cacd02f3219e1a2f0fcab7 (diff) | |
download | scribiu-695a146f6e1e923b599ea140f934cbe97b483858.tar.gz scribiu-695a146f6e1e923b599ea140f934cbe97b483858.zip |
fix issue with hot unplug of smartpen
-rw-r--r-- | smartpenmanager.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/smartpenmanager.cc b/smartpenmanager.cc index f35786a..1750589 100644 --- a/smartpenmanager.cc +++ b/smartpenmanager.cc @@ -77,7 +77,10 @@ void SmartpenManager::handleMonitorActivity() qDebug() << "udev activity"; udev_device *dev = udev_monitor_receive_device(_monitor); if (dev) { - processDevice(dev); + const char *action = udev_device_get_action(dev); + if (action && strcmp(action, "add") == 0) { + processDevice(dev); + } udev_device_unref(dev); } } |