summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--anytun.cpp2
-rw-r--r--keyDerivation.h2
-rw-r--r--syncBuffer.h7
3 files changed, 7 insertions, 4 deletions
diff --git a/anytun.cpp b/anytun.cpp
index a165534..8c5d7af 100644
--- a/anytun.cpp
+++ b/anytun.cpp
@@ -194,7 +194,7 @@ void* sender(void* p)
if( param->cl.empty())
continue;
- ConnectionParam conn = param->cl.getConnection();
+ ConnectionParam & conn = param->cl.getConnection();
// add payload type
if(param->dev.getType() == TunDevice::TYPE_TUN)
pack.addPayloadType(PAYLOAD_TYPE_TUN);
diff --git a/keyDerivation.h b/keyDerivation.h
index 10107d7..420aa84 100644
--- a/keyDerivation.h
+++ b/keyDerivation.h
@@ -51,7 +51,7 @@ typedef enum {
class KeyDerivation
{
public:
- KeyDerivation() : ld_kdr_(-1), cipher_(NULL) {};
+ KeyDerivation() : ld_kdr_(-1), salt_(0), cipher_(NULL) {};
virtual ~KeyDerivation() {};
void init(Buffer key, Buffer salt);
diff --git a/syncBuffer.h b/syncBuffer.h
index 9094d8f..840d929 100644
--- a/syncBuffer.h
+++ b/syncBuffer.h
@@ -47,9 +47,12 @@ private:
template<class Archive>
void serialize(Archive & ar, const unsigned int version)
{
+ u_int32_t ll = length_+1;
+ ar & ll;
ar & length_;
- for(u_int32_t i = 0; i < length_; i++)
- ar & buf_[i];
+ ar & ll;
+ //for(u_int32_t i = 0; i < length_; i++)
+ // ar & (*this)[i];
}
};