summaryrefslogtreecommitdiff
path: root/src/anyrtpproxy/commandHandler.cpp
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2008-05-20 13:45:06 +0000
committerChristian Pointner <equinox@anytun.org>2008-05-20 13:45:06 +0000
commitff8ab8d7459c04a55794c4abc32f2cb8622f1624 (patch)
tree3ebb82f4597d3b589cedfac0e48eeead41dec5ab /src/anyrtpproxy/commandHandler.cpp
parentbugfix with strerror_r - still not working but at least not using uninitializ... (diff)
added -i option to anyrtpproxy
Diffstat (limited to 'src/anyrtpproxy/commandHandler.cpp')
-rw-r--r--src/anyrtpproxy/commandHandler.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/anyrtpproxy/commandHandler.cpp b/src/anyrtpproxy/commandHandler.cpp
index 032d001..6df044e 100644
--- a/src/anyrtpproxy/commandHandler.cpp
+++ b/src/anyrtpproxy/commandHandler.cpp
@@ -41,6 +41,7 @@
#include "../syncCommand.h"
#include "../rtpSessionTable.h"
#include "callIdQueue.h"
+#include "options.h"
#define MAX_COMMAND_LENGTH 1000
@@ -179,7 +180,10 @@ string CommandHandler::handleRequest(string modifiers, string call_id, string ad
throw std::runtime_error("no free port found");
}
- session.setLocalAddr("0.0.0.0"); // TODO: read this from config
+ if(gOpt.getLocalAddr() == "")
+ session.setLocalAddr("0.0.0.0");
+ else
+ session.setLocalAddr(gOpt.getLocalAddr());
session.setLocalPort1(port1);
session.setLocalPort2(port2);
}