summaryrefslogtreecommitdiff
path: root/connectionList.cpp
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2007-11-07 00:07:28 +0000
committerChristian Pointner <equinox@anytun.org>2007-11-07 00:07:28 +0000
commitbb280470239611ed91f5077887081a4ec5eaf56e (patch)
treefe2009533b0a979b4e30038b6d240abf3a1c8d94 /connectionList.cpp
parentbaut wieder (diff)
i bin da beste deshalb haut des jetzt endlich so hin
Diffstat (limited to 'connectionList.cpp')
-rw-r--r--connectionList.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/connectionList.cpp b/connectionList.cpp
index 81a0f49..baa8c44 100644
--- a/connectionList.cpp
+++ b/connectionList.cpp
@@ -44,7 +44,13 @@ ConnectionList::~ConnectionList()
void ConnectionList::addConnection(ConnectionParam &conn, const std::string &name)
{
Lock lock(mutex_);
-// connections_[name]=conn;
+
+ std::pair<ConnectionMap::iterator, bool> ret = connections_.insert(ConnectionMap::value_type(name, conn));
+ if(!ret.second)
+ {
+ connections_.erase(ret.first);
+ connections_.insert(ConnectionMap::value_type(name, conn));
+ }
}
void ConnectionList::clear()