aboutsummaryrefslogtreecommitdiffstats
path: root/src/msc_conn.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-11-16 11:03:19 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-11-16 11:03:19 +0100
commit594ee9a8c444034d75f995e0efbae646ddae2761 (patch)
tree002248352a90cec7567d5bf5327cecf1d759300c /src/msc_conn.c
parented3046339e141938cd0eb3a45e7ab91e518675ac (diff)
udt_relay: Add a forked copy of main to just relay messages
Do not run any of the header rewriting for messages. This will simply relay SCCP friends to the MTP library. Some work on msc_conn.c is needed to avoid calling most of it.
Diffstat (limited to 'src/msc_conn.c')
-rw-r--r--src/msc_conn.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/msc_conn.c b/src/msc_conn.c
index 6e996d9..f980178 100644
--- a/src/msc_conn.c
+++ b/src/msc_conn.c
@@ -519,7 +519,7 @@ static int mgcp_create_port(struct bsc_data *bsc)
return 0;
}
-int msc_init(struct bsc_data *bsc)
+int msc_init(struct bsc_data *bsc, int mgcp)
{
write_queue_init(&bsc->msc_connection, 100);
bsc->reconnect_timer.cb = msc_reconnect;
@@ -536,7 +536,7 @@ int msc_init(struct bsc_data *bsc)
bsc->pong_timeout.data = bsc;
/* create MGCP port */
- if (mgcp_create_port(bsc) != 0)
+ if (mgcp && mgcp_create_port(bsc) != 0)
return -1;
/* now connect to the BSC */
@@ -597,6 +597,11 @@ static void msc_send_id_response(struct bsc_data *bsc)
msc_send(bsc, msg, IPAC_PROTO_IPACCESS);
}
+void msc_send_direct(struct bsc_data *bsc, struct msgb *msg)
+{
+ return msc_send(bsc, msg, IPAC_PROTO_SCCP);
+}
+
void msc_send_msg(struct bsc_data *bsc, int rc, struct sccp_parse_result *result, struct msgb *_msg)
{
struct msgb *msg;