aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/mgcp/mgcp_protocol.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-08-03 02:27:21 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-08-03 02:27:21 +0800
commit98a3877e979c9e901a7adc6946904a5d535cb93f (patch)
tree6ad5a66f067a96eeff5d76c2fcca19cedcbdc8aa /openbsc/src/mgcp/mgcp_protocol.c
parent294cfcc1e5465075920d10c3fc66c1bdf004330b (diff)
mgcp: Implement the "loopback" mode for a connection endpoint.
Diffstat (limited to 'openbsc/src/mgcp/mgcp_protocol.c')
-rw-r--r--openbsc/src/mgcp/mgcp_protocol.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/openbsc/src/mgcp/mgcp_protocol.c b/openbsc/src/mgcp/mgcp_protocol.c
index 8131277a..d12d1828 100644
--- a/openbsc/src/mgcp/mgcp_protocol.c
+++ b/openbsc/src/mgcp/mgcp_protocol.c
@@ -38,13 +38,6 @@
#include <openbsc/mgcp.h>
#include <openbsc/mgcp_internal.h>
-enum mgcp_connection_mode {
- MGCP_CONN_NONE = 0,
- MGCP_CONN_RECV_ONLY = 1,
- MGCP_CONN_SEND_ONLY = 2,
- MGCP_CONN_RECV_SEND = MGCP_CONN_RECV_ONLY | MGCP_CONN_SEND_ONLY,
-};
-
/**
* Macro for tokenizing MGCP messages and SDP in one go.
*
@@ -364,6 +357,8 @@ static int parse_conn_mode(const char* msg, int *conn_mode)
*conn_mode = MGCP_CONN_RECV_ONLY;
else if (strcmp(msg, "sendrecv") == 0)
*conn_mode = MGCP_CONN_RECV_SEND;
+ else if (strcmp(msg, "loopback") == 0)
+ *conn_mode = MGCP_CONN_LOOPBACK;
else {
LOGP(DMGCP, LOGL_ERROR, "Unknown connection mode: '%s'\n", msg);
ret = -1;