summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksandar Donchev <Aleksander.Donchev@partner.bmw.de>2014-07-10 08:29:41 (GMT)
committerAleksandar Donchev <Aleksander.Donchev@partner.bmw.de>2014-07-10 09:00:10 (GMT)
commit5e4950430ca01fadcf11cfdba7b1ccbb329d8b76 (patch)
tree885d493c317e9f9135aa944cb7f746ab0297d7d6
parentbf8c74f698d7ed5174d3157933079a27b2452cb2 (diff)
downloadaudiomanager-5e4950430ca01fadcf11cfdba7b1ccbb329d8b76.tar.gz
* Minor fix for connection id generation.
Signed-off-by: Christian Linke <christian.linke@bmw.de>
-rw-r--r--AudioManagerDaemon/src/CAmDatabaseHandlerMap.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/AudioManagerDaemon/src/CAmDatabaseHandlerMap.cpp b/AudioManagerDaemon/src/CAmDatabaseHandlerMap.cpp
index 0aec9f2..d3df07f 100644
--- a/AudioManagerDaemon/src/CAmDatabaseHandlerMap.cpp
+++ b/AudioManagerDaemon/src/CAmDatabaseHandlerMap.cpp
@@ -390,12 +390,16 @@ template <typename TMapKey,class TMapObject> bool CAmDatabaseHandlerMap::CAmMapp
bool notFreeIDs = false;
while( existsObjectWithKeyInMap(nextID, map) )
{
+
if( sourceID.mCurrentValue < sourceID.mMax )
nextID = sourceID.mCurrentValue++;
else
- nextID = sourceID.mCurrentValue = sourceID.mMin;
+ {
+ sourceID.mCurrentValue = sourceID.mMin;
+ nextID = sourceID.mCurrentValue++;
+ }
- if( sourceID.mCurrentValue == lastID )
+ if( nextID == lastID )
{
notFreeIDs = true;
break;