diff options
author | Othmar Gsenger <otti@anytun.org> | 2007-12-07 09:52:31 +0000 |
---|---|---|
committer | Othmar Gsenger <otti@anytun.org> | 2007-12-07 09:52:31 +0000 |
commit | bb802659d86359d275b705be0d5d0f6828349e45 (patch) | |
tree | 40680eeef8ef2b9352f66a07224dd299520c1565 /connectionList.cpp | |
parent | added boost as dependency (diff) |
split parameters to global params and connection params (moved to connection list)
Diffstat (limited to 'connectionList.cpp')
-rw-r--r-- | connectionList.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/connectionList.cpp b/connectionList.cpp index baa8c44..1186263 100644 --- a/connectionList.cpp +++ b/connectionList.cpp @@ -53,7 +53,21 @@ void ConnectionList::addConnection(ConnectionParam &conn, const std::string &nam } } +ConnectionParam & ConnectionList::getConnection() +{ + Lock lock(mutex_); + ConnectionMap::iterator it = connections_.begin(); + return it->second; +} + void ConnectionList::clear() { Lock lock(mutex_); + connections_.clear(); +} + +bool ConnectionList::empty() +{ + Lock lock(mutex_); + return connections_.empty(); } |