summaryrefslogtreecommitdiff
path: root/rtpSession.h
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2008-03-14 13:38:51 +0000
committerChristian Pointner <equinox@anytun.org>2008-03-14 13:38:51 +0000
commit4d95b9eb68c438ad166d75b1cb9053c03bf2356e (patch)
treede59c9404be32ae4db5a9dd9a201492f5c86a065 /rtpSession.h
parentanyrtpproxy can handled most commands (diff)
bugfixes @ anyrtpproxy
Diffstat (limited to 'rtpSession.h')
-rw-r--r--rtpSession.h28
1 files changed, 13 insertions, 15 deletions
diff --git a/rtpSession.h b/rtpSession.h
index 4a43d3f..0a21e5e 100644
--- a/rtpSession.h
+++ b/rtpSession.h
@@ -33,8 +33,6 @@
#include "threadUtils.hpp"
-#include <iostream>
-
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
@@ -42,17 +40,19 @@ class RtpSession
{
public:
RtpSession();
- ~RtpSession();
void init();
bool isDead();
bool isDead(bool d);
- u_int16_t getLocalPort();
- RtpSession& setLocalPort(u_int16_t p);
std::string getLocalAddr();
RtpSession& setLocalAddr(std::string a);
+ u_int16_t getLocalPort1();
+ RtpSession& setLocalPort1(u_int16_t p);
+ u_int16_t getLocalPort2();
+ RtpSession& setLocalPort2(u_int16_t p);
+
u_int16_t getRemotePort1();
RtpSession& setRemotePort1(u_int16_t p);
@@ -67,7 +67,7 @@ public:
private:
RtpSession(const RtpSession & src);
- void reinitSock();
+ void reinit();
//TODO: check if this is ok
friend class boost::serialization::access;
@@ -76,33 +76,31 @@ private:
{
Lock lock(mutex_);
- std::cout << "seralize called: " << local_port_ << "," << local_addr_ << std::endl;
-
-
- u_int16_t old_local_port = local_port_;
std::string old_local_addr = local_addr_;
+ u_int16_t old_local_port1 = local_port1_;
+ u_int16_t old_local_port2 = local_port2_;
ar & dead_;
ar & local_addr_;
- ar & local_port_;
+ ar & local_port1_;
+ ar & local_port2_;
ar & remote_addr1_;
ar & remote_port1_;
ar & remote_addr2_;
ar & remote_port2_;
- if(old_local_port != local_port_ || old_local_addr != local_addr_)
- reinitSock();
+ if(old_local_port1 != local_port1_ || old_local_port2 != local_port2_ || old_local_addr != local_addr_)
+ reinit();
in_sync_ = true;
}
bool in_sync_;
::Mutex mutex_;
- void* sock_;
bool dead_;
- u_int16_t local_port_;
std::string local_addr_;
+ u_int16_t local_port1_, local_port2_;
std::string remote_addr1_, remote_addr2_;
u_int16_t remote_port1_, remote_port2_;
};