summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--connectionList.cpp2
-rw-r--r--connectionParam.cpp2
-rw-r--r--connectionParam.h11
-rw-r--r--options.h1
-rw-r--r--router.cpp2
-rw-r--r--router.h2
7 files changed, 12 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 4148821..b1ef755 100644
--- a/Makefile
+++ b/Makefile
@@ -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
diff --git a/options.h b/options.h
index 23b9824..fe4b243 100644
--- a/options.h
+++ b/options.h
@@ -31,6 +31,7 @@
#ifndef _OPTIONS_H_
#define _OPTIONS_H_
+#include "datatypes.h"
#include "threadUtils.hpp"
class Options
diff --git a/router.cpp b/router.cpp
index 438a23a..98cdce4 100644
--- a/router.cpp
+++ b/router.cpp
@@ -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_);
diff --git a/router.h b/router.h
index 8ff5f5f..e487cec 100644
--- a/router.h
+++ b/router.h
@@ -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);