From 1468f889e9df22cf465da8219f484bc3fbb6adc2 Mon Sep 17 00:00:00 2001 From: Michael Carpenter Date: Fri, 23 Nov 2012 16:53:56 -0500 Subject: [PATCH] Change so re-subscribing to a pid, removes it from the blacklist if it has been tagged as invalid --- plugins/obd2plugin/obd2source.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/obd2plugin/obd2source.cpp b/plugins/obd2plugin/obd2source.cpp index 0cfc014..cb8f364 100644 --- a/plugins/obd2plugin/obd2source.cpp +++ b/plugins/obd2plugin/obd2source.cpp @@ -709,6 +709,15 @@ void OBD2Source::subscribeToPropertyChanges(VehicleProperty::Property property) ObdPid *pid = obd2AmbInstance->createPidforProperty(property); + + //If the pid is currently in the blacklist map, erase it. This allows for applications + //to "un-blacklist" a pid by re-subscribing to it. + if (m_blacklistPidCountMap.find(pid->pid) != m_blacklistPidCountMap.end()) + { + m_blacklistPidCountMap.erase(m_blacklistPidCountMap.find(pid->pid)); + } + + g_async_queue_push(subscriptionAddQueue,pid); CommandRequest *req = new CommandRequest(); req->req = "connectifnot"; -- 2.7.4