From 4d95b9eb68c438ad166d75b1cb9053c03bf2356e Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 14 Mar 2008 13:38:51 +0000 Subject: bugfixes @ anyrtpproxy --- rtpSession.h | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'rtpSession.h') 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 - #include #include @@ -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_; }; -- cgit v1.2.3