diff options
author | Christian Pointner <equinox@anytun.org> | 2007-11-06 23:50:17 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2007-11-06 23:50:17 +0000 |
commit | 817378609028b53aa86400d4ad3d52db6cab3bd7 (patch) | |
tree | fba84e08822f048d9c06d7457068e0b45681866b | |
parent | router + connection manage eingebaut (diff) |
baut wieder
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | connectionList.cpp | 2 | ||||
-rw-r--r-- | connectionParam.cpp | 2 | ||||
-rw-r--r-- | connectionParam.h | 11 | ||||
-rw-r--r-- | options.h | 1 | ||||
-rw-r--r-- | router.cpp | 2 | ||||
-rw-r--r-- | router.h | 2 |
7 files changed, 12 insertions, 10 deletions
@@ -38,7 +38,7 @@ OBJS = anytun.o \ authAlgo.o \ keyDerivation.o \ connectionList.o \ - connectionParams.o \ + connectionParam.o \ networkAddress.o \ PracticalSocket.o \ router.o \ diff --git a/connectionList.cpp b/connectionList.cpp index 2b857f3..81a0f49 100644 --- a/connectionList.cpp +++ b/connectionList.cpp @@ -44,7 +44,7 @@ ConnectionList::~ConnectionList() void ConnectionList::addConnection(ConnectionParam &conn, const std::string &name) { Lock lock(mutex_); - connections_[name]=conn; +// connections_[name]=conn; } void ConnectionList::clear() diff --git a/connectionParam.cpp b/connectionParam.cpp index d053c6b..5ca31a9 100644 --- a/connectionParam.cpp +++ b/connectionParam.cpp @@ -30,6 +30,6 @@ #include "connectionParam.h" -ConnectionParam::ConnectionParam(Options& opt,KeyDerivation& kd,Cypher& c,AuthAlgo& a,SeqWindow& seq):opt_(opt),kd_(kd),c_(c),a_(a),seq_(seq) +ConnectionParam::ConnectionParam(Options& opt,KeyDerivation& kd,Cypher& c,AuthAlgo& a,SeqWindow& seq) : opt_(opt),kd_(kd),c_(c),a_(a),seq_(seq) { } diff --git a/connectionParam.h b/connectionParam.h index 96d5525..671c909 100644 --- a/connectionParam.h +++ b/connectionParam.h @@ -39,12 +39,13 @@ class ConnectionParam { +public: ConnectionParam(Options& opt,KeyDerivation& kd,Cypher& c,AuthAlgo& a,SeqWindow& seq); - Options& opt_; - KeyDerivation& kd_; - Cypher& c_; - AuthAlgo& a_; - SeqWindow& seq_; + const Options& opt_; + const KeyDerivation& kd_; + const Cypher& c_; + const AuthAlgo& a_; + const SeqWindow& seq_; }; #endif @@ -31,6 +31,7 @@ #ifndef _OPTIONS_H_ #define _OPTIONS_H_ +#include "datatypes.h" #include "threadUtils.hpp" class Options @@ -46,7 +46,7 @@ void Router::addConnection(ConnectionParam &conn,const std::string &name) con_list_.addConnection(conn,name); } -connection_param_t Router::getRoute() +ConnectionParam Router::getRoute() { Lock lock(mutex_); @@ -42,7 +42,7 @@ public: Router(); ~Router(); void addConnection(ConnectionParam &conn,const std::string &name); - connection_param_t getRoute(); + ConnectionParam getRoute(); private: Router(const Router &s); |