From 594ee9a8c444034d75f995e0efbae646ddae2761 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 16 Nov 2010 11:03:19 +0100 Subject: 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. --- src/msc_conn.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/msc_conn.c') 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; -- cgit v1.2.3