summaryrefslogtreecommitdiff
path: root/AudioManagerDaemon/src
diff options
context:
space:
mode:
authorchristian linke <christian.linke@bmw.de>2012-12-06 13:31:52 +0100
committerchristian linke <christian.linke@bmw.de>2012-12-06 13:38:51 +0100
commit215e8a72dc81e8a86dd5b3a8ca40fd2c7c6a0b9c (patch)
treee9ef5639752a65ee2e678bafdb36bd56b09bfd91 /AudioManagerDaemon/src
parent104255615d643a2278d8430a876413793563ab36 (diff)
downloadaudiomanager-215e8a72dc81e8a86dd5b3a8ca40fd2c7c6a0b9c.tar.gz
fix [OSS BUG 23] - connection removed if routing returns !=E_OK. added test case to test this as well
Signed-off-by: christian linke <christian.linke@bmw.de>
Diffstat (limited to 'AudioManagerDaemon/src')
-rw-r--r--AudioManagerDaemon/src/CAmRoutingReceiver.cpp17
-rw-r--r--AudioManagerDaemon/src/CAmRoutingSender.cpp1
2 files changed, 17 insertions, 1 deletions
diff --git a/AudioManagerDaemon/src/CAmRoutingReceiver.cpp b/AudioManagerDaemon/src/CAmRoutingReceiver.cpp
index 7e14e33..f0821a9 100644
--- a/AudioManagerDaemon/src/CAmRoutingReceiver.cpp
+++ b/AudioManagerDaemon/src/CAmRoutingReceiver.cpp
@@ -92,6 +92,10 @@ void CAmRoutingReceiver::ackDisconnect(const am_Handle_s handle, const am_connec
if (error == E_OK)
{
mpDatabaseHandler->removeConnection(connectionID);
+ if (mpRoutingSender->removeConnectionLookup(connectionID)!=E_OK)
+ {
+ logError("CAmRoutingReceiver::ackDisconnect could not remove connectionId from lookup");
+ }
}
mpControlSender->cbAckDisconnect(handle, error);
}
@@ -378,4 +382,17 @@ void am::CAmRoutingReceiver::waitOnRundown(bool rundown)
{
mWaitRundown = rundown;
}
+
+am_Error_e CAmRoutingSender::removeConnectionLookup(const am_connectionID_t connectionID)
+{
+ ConnectionInterfaceMap::iterator iter = mMapConnectionInterface.begin();
+ iter = mMapConnectionInterface.find(connectionID);
+ if (iter != mMapConnectionInterface.end())
+ {
+ mMapConnectionInterface.erase(iter);
+ return (E_OK);
+ }
+ return (E_UNKNOWN);
+}
+
}
diff --git a/AudioManagerDaemon/src/CAmRoutingSender.cpp b/AudioManagerDaemon/src/CAmRoutingSender.cpp
index 05078a9..f45f918 100644
--- a/AudioManagerDaemon/src/CAmRoutingSender.cpp
+++ b/AudioManagerDaemon/src/CAmRoutingSender.cpp
@@ -214,7 +214,6 @@ am_Error_e CAmRoutingSender::asyncDisconnect(am_Handle_s& handle, const am_conne
handle = createHandle(handleData, H_DISCONNECT);
mMapHandleInterface.insert(std::make_pair(+ handle.handle, iter->second));
am_Error_e returnVal = iter->second->asyncDisconnect(handle, connectionID);
- mMapConnectionInterface.erase(iter);
return (returnVal);
}