diff options
author | Christian Pointner <equinox@anytun.org> | 2008-11-25 15:24:20 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2008-11-25 15:24:20 +0000 |
commit | 29906629c964af3fd19696f8eb3616dedb85c5e6 (patch) | |
tree | 92a1e0b71a28f6fd77b02a3008a035ee11d083f5 /src/anyrtpproxy | |
parent | added header to syncOnConnect (diff) |
anyrtpproxy furhter fixes
Diffstat (limited to 'src/anyrtpproxy')
-rw-r--r-- | src/anyrtpproxy/anyrtpproxy.cpp | 3 | ||||
-rw-r--r-- | src/anyrtpproxy/commandHandler.cpp | 6 | ||||
-rw-r--r-- | src/anyrtpproxy/commandHandler.h | 24 |
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_; }; |