From 6ddf112880c0a3c62c391a0f7d3338de8131e642 Mon Sep 17 00:00:00 2001 From: dogmaphobic Date: Sun, 10 May 2015 14:23:03 -0400 Subject: [PATCH] Don't delete link configuration if there is still an active link using it. --- src/comm/LinkManager.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/comm/LinkManager.cc b/src/comm/LinkManager.cc index 78caa91cc..b162e29e4 100644 --- a/src/comm/LinkManager.cc +++ b/src/comm/LinkManager.cc @@ -506,9 +506,12 @@ void LinkManager::_updateConfigurationList(void) // We only care about dynamic links if(pLink->isDynamic()) { if(pLink->type() == LinkConfiguration::TypeSerial) { - SerialConfiguration* pSerial = dynamic_cast(pLink); - if(!currentPorts.contains(pSerial->portName())) { - _confToDelete.append(pSerial); + // Don't mess with connected link. Let it deal with the disapearing device. + if(pLink->getLink() == NULL) { + SerialConfiguration* pSerial = dynamic_cast(pLink); + if(!currentPorts.contains(pSerial->portName())) { + _confToDelete.append(pSerial); + } } } } -- 2.22.0