aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/msc_connection.h1
-rw-r--r--src/msc_conn.c23
-rw-r--r--src/sccp_state.c12
3 files changed, 11 insertions, 25 deletions
diff --git a/include/msc_connection.h b/include/msc_connection.h
index 9690906..51a5326 100644
--- a/include/msc_connection.h
+++ b/include/msc_connection.h
@@ -70,7 +70,6 @@ struct msc_connection {
/* msc related functions */
void msc_send_rlc(struct msc_connection *bsc, struct sccp_source_reference *src, struct sccp_source_reference *dest);
void msc_send_reset(struct msc_connection *bsc);
-void msc_send_msg(struct msc_connection *bsc, int rc, struct sccp_parse_result *, struct msgb *msg);
void msc_send_direct(struct msc_connection *bsc, struct msgb *msg);
void msc_close_connection(struct msc_connection *data);
diff --git a/src/msc_conn.c b/src/msc_conn.c
index a384290..84f6161 100644
--- a/src/msc_conn.c
+++ b/src/msc_conn.c
@@ -21,8 +21,6 @@
#include <msc_connection.h>
#include <bsc_data.h>
-#include <bsc_ussd.h>
-#include <bss_patch.h>
#include <bsc_sccp.h>
#include <bssap_sccp.h>
#include <ipaccess.h>
@@ -520,27 +518,6 @@ void msc_send_direct(struct msc_connection *fw, struct msgb *msg)
return msc_send(fw, msg, IPAC_PROTO_SCCP);
}
-void msc_send_msg(struct msc_connection *fw, int rc, struct sccp_parse_result *result, struct msgb *_msg)
-{
- struct msgb *msg;
-
- if (fw->msc_connection.bfd.fd < 0) {
- LOGP(DMSC, LOGL_ERROR, "No connection to the MSC. dropping\n");
- return;
- }
-
- bsc_ussd_handle_out_msg(fw, result, _msg);
-
- msg = msgb_alloc_headroom(4096, 128, "SCCP to MSC");
- if (!msg) {
- LOGP(DMSC, LOGL_ERROR, "Failed to alloc MSC msg.\n");
- return;
- }
-
- bss_rewrite_header_for_msc(rc, msg, _msg, result);
- msc_send(fw, msg, IPAC_PROTO_SCCP);
-}
-
struct msc_connection *msc_connection_create(struct bsc_data *bsc, int mgcp)
{
struct msc_connection *msc;
diff --git a/src/sccp_state.c b/src/sccp_state.c
index 74f571d..27cef5e 100644
--- a/src/sccp_state.c
+++ b/src/sccp_state.c
@@ -69,6 +69,7 @@ void mtp_link_set_forward_sccp(struct mtp_link_set *link, struct msgb *_msg, int
int rc;
struct sccp_parse_result result;
struct msc_connection *fw = link->fw;
+ struct msgb *msg;
if (fw->forward_only) {
msc_send_direct(fw, _msg);
@@ -111,8 +112,17 @@ void mtp_link_set_forward_sccp(struct mtp_link_set *link, struct msgb *_msg, int
return;
}
+ /* now send it out */
+ bsc_ussd_handle_out_msg(link->fw, &result, _msg);
+
+ msg = msgb_alloc_headroom(4096, 128, "SCCP to MSC");
+ if (!msg) {
+ LOGP(DMSC, LOGL_ERROR, "Failed to alloc MSC msg.\n");
+ return;
+ }
- msc_send_msg(fw, rc, &result, _msg);
+ bss_rewrite_header_for_msc(rc, msg, _msg, &result);
+ msc_send_direct(link->fw, msg);
}
void mtp_link_set_forward_isup(struct mtp_link_set *set, struct msgb *msg, int sls)