summaryrefslogtreecommitdiff
path: root/src/connectionList.h
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2014-06-29 00:06:23 +0000
committerChristian Pointner <equinox@anytun.org>2014-06-29 00:06:23 +0000
commit92a551b96e625257def26771155ebd64c6d8757e (patch)
tree7d5b2d0a043f746bfb10ccc9679ac59646a95b72 /src/connectionList.h
parentwhile(1) vs. for(;;) (diff)
fixed not working singletons - still not threadsafe but at least they don't pretend to be
Diffstat (limited to 'src/connectionList.h')
-rw-r--r--src/connectionList.h13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/connectionList.h b/src/connectionList.h
index e0adf55..46bb998 100644
--- a/src/connectionList.h
+++ b/src/connectionList.h
@@ -47,7 +47,9 @@ class ConnectionList
public:
ConnectionList();
~ConnectionList();
+
static ConnectionList& instance();
+
void addConnection(ConnectionParam& conn, uint16_t mux);
const ConnectionMap::iterator getConnection(uint16_t mux);
const ConnectionMap::iterator getEnd();
@@ -60,17 +62,6 @@ public:
Mutex& getMutex();
private:
- static Mutex instMutex;
- static ConnectionList* inst;
- class instanceCleaner
- {
- public:
- ~instanceCleaner() {
- if(ConnectionList::inst != 0) {
- delete ConnectionList::inst;
- }
- }
- };
ConnectionList(const ConnectionList& s);
void operator=(const ConnectionList& s);
ConnectionMap connections_;