summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/anyrtpproxy/anyrtpproxy.cpp3
-rw-r--r--src/anyrtpproxy/commandHandler.cpp6
-rw-r--r--src/anyrtpproxy/commandHandler.h24
3 files changed, 16 insertions, 17 deletions
diff --git a/src/anyrtpproxy/anyrtpproxy.cpp b/src/anyrtpproxy/anyrtpproxy.cpp
index e0519b0..bbfd412 100644
--- a/src/anyrtpproxy/anyrtpproxy.cpp
+++ b/src/anyrtpproxy/anyrtpproxy.cpp
@@ -45,6 +45,7 @@
#include "../syncCommand.h"
#include "../syncQueue.h"
#include "../syncClient.h"
+//#include "../syncOnConnect.h"
#include "../threadUtils.hpp"
@@ -311,7 +312,7 @@ void syncListener(SyncQueue * queue)
SyncServer server(io_service,e);
- server.onConnect=boost::bind(syncOnConnect,_1);
+// server.onConnect=boost::bind(syncOnConnect,_1);
queue->setSyncServerPtr(&server);
io_service.run();
}
diff --git a/src/anyrtpproxy/commandHandler.cpp b/src/anyrtpproxy/commandHandler.cpp
index 211b790..f95b3ab 100644
--- a/src/anyrtpproxy/commandHandler.cpp
+++ b/src/anyrtpproxy/commandHandler.cpp
@@ -46,13 +46,13 @@
#define MAX_COMMAND_LENGTH 1000
-CommandHandler::CommandHandler(SyncQueue& q, u_int16_t lp,PortWindow & pw) : queue_(q), running_(true), control_sock_(lp),
- local_address_("0.0.0.0"), local_port_(lp),port_window_(pw)
+CommandHandler::CommandHandler(SyncQueue& q, std::string lp,PortWindow & pw) : queue_(q), running_(true), control_sock_(lp),
+ local_address_(""), local_port_(lp),port_window_(pw)
{
pthread_create(&thread_, NULL, run, this);
}
-CommandHandler::CommandHandler(SyncQueue& q, string la, u_int16_t lp,PortWindow & pw) : queue_(q), running_(true), control_sock_(la, lp),
+CommandHandler::CommandHandler(SyncQueue& q, string la, std::string lp, PortWindow & pw) : queue_(q), running_(true), control_sock_(la, lp),
local_address_(la), local_port_(lp),port_window_(pw)
{
pthread_create(&thread_, NULL, run, this);
diff --git a/src/anyrtpproxy/commandHandler.h b/src/anyrtpproxy/commandHandler.h
index 06eb5d2..b7a565a 100644
--- a/src/anyrtpproxy/commandHandler.h
+++ b/src/anyrtpproxy/commandHandler.h
@@ -38,13 +38,11 @@
#include "../syncQueue.h"
#include "portWindow.h"
-using std::string;
-
class CommandHandler
{
public:
- CommandHandler(SyncQueue& q, u_int16_t lp, PortWindow &);
- CommandHandler(SyncQueue& q, string la, u_int16_t lp, PortWindow &);
+ CommandHandler(SyncQueue& q, std::string lp, PortWindow &);
+ CommandHandler(SyncQueue& q, std::string la, std::string lp, PortWindow &);
~CommandHandler();
bool isRunning();
@@ -67,22 +65,22 @@ private:
void operator=(const CommandHandler &c);
static void* run(void* s);
- string handle(string command);
+ std::string handle(std::string command);
- string handleRequest(string modifiers, string call_id, string addr, string port, string from_tag, string to_tag);
- string handleResponse(string modifiers, string call_id, string addr, string port, string from_tag, string to_tag);
- string handleDelete(string call_id, string from_tag, string to_tag);
- string handleVersion();
- string handleVersionF(string date_code);
- string handleInfo();
+ std::string handleRequest(std::string modifiers, std::string call_id, std::string addr, std::string port, std::string from_tag, std::string to_tag);
+ std::string handleResponse(std::string modifiers, std::string call_id, std::string addr, std::string port, std::string from_tag, std::string to_tag);
+ std::string handleDelete(std::string call_id, std::string from_tag, std::string to_tag);
+ std::string handleVersion();
+ std::string handleVersionF(std::string date_code);
+ std::string handleInfo();
pthread_t thread_;
SyncQueue& queue_;
bool running_;
UDPSocket control_sock_;
- string local_address_;
- u_int16_t local_port_;
+ std::string local_address_;
+ std::string local_port_;
PortWindow& port_window_;
};