aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bss_patch.c14
-rw-r--r--src/sccp_state.c4
2 files changed, 10 insertions, 8 deletions
diff --git a/src/bss_patch.c b/src/bss_patch.c
index 9d89d87..cc897b6 100644
--- a/src/bss_patch.c
+++ b/src/bss_patch.c
@@ -34,7 +34,7 @@
#include <arpa/inet.h>
-static int handle_bss_mgmt(struct msgb *msg, struct sccp_parse_result *sccp);
+static int handle_bss_mgmt(struct ss7_application *, struct msgb *msg, struct sccp_parse_result *sccp);
static int handle_bss_dtap(struct msgb *msg, struct sccp_parse_result *sccp, int dir);
static void patch_ass_rqst(struct msgb *msg, int length)
@@ -66,7 +66,7 @@ static void patch_ass_rqst(struct msgb *msg, int length)
}
}
-static void patch_ass_cmpl(struct msgb *msg, int length)
+static void patch_ass_cmpl(struct ss7_application *app, struct msgb *msg, int length)
{
struct tlv_parsed tp;
uint8_t *data;
@@ -103,7 +103,8 @@ static void patch_ass_cmpl(struct msgb *msg, int length)
}
}
-int bss_patch_filter_msg(struct msgb *msg, struct sccp_parse_result *sccp, int dir)
+int bss_patch_filter_msg(struct ss7_application *app, struct msgb *msg,
+ struct sccp_parse_result *sccp, int dir)
{
int type;
memset(sccp, 0, sizeof(*sccp));
@@ -145,7 +146,7 @@ int bss_patch_filter_msg(struct msgb *msg, struct sccp_parse_result *sccp, int d
}
if (msg->l3h[0] == BSSAP_MSG_BSS_MANAGEMENT)
- return handle_bss_mgmt(msg, sccp);
+ return handle_bss_mgmt(app, msg, sccp);
if (msg->l3h[0] == BSSAP_MSG_DTAP)
return handle_bss_dtap(msg, sccp, dir);
@@ -153,7 +154,8 @@ int bss_patch_filter_msg(struct msgb *msg, struct sccp_parse_result *sccp, int d
return -1;
}
-static int handle_bss_mgmt(struct msgb *msg, struct sccp_parse_result *sccp)
+static int handle_bss_mgmt(struct ss7_application *app, struct msgb *msg,
+ struct sccp_parse_result *sccp)
{
switch (msg->l3h[2]) {
case BSS_MAP_MSG_ASSIGMENT_RQST:
@@ -162,7 +164,7 @@ static int handle_bss_mgmt(struct msgb *msg, struct sccp_parse_result *sccp)
break;
case BSS_MAP_MSG_ASSIGMENT_COMPLETE:
msg->l3h = &msg->l3h[2];
- patch_ass_cmpl(msg, sccp->data_len - 2);
+ patch_ass_cmpl(app, msg, sccp->data_len - 2);
break;
case BSS_MAP_MSG_RESET:
return BSS_FILTER_RESET;
diff --git a/src/sccp_state.c b/src/sccp_state.c
index c2b3834..e961fdd 100644
--- a/src/sccp_state.c
+++ b/src/sccp_state.c
@@ -71,7 +71,7 @@ void app_forward_sccp(struct ss7_application *app, struct msgb *_msg, int sls)
return;
}
- rc = bss_patch_filter_msg(_msg, &result, BSS_DIR_MSC);
+ rc = bss_patch_filter_msg(app, _msg, &result, BSS_DIR_MSC);
if (rc == BSS_FILTER_RESET) {
LOGP(DMSC, LOGL_NOTICE, "Filtering BSS Reset from the BSC\n");
msc_mgcp_reset(msc);
@@ -549,7 +549,7 @@ void msc_dispatch_sccp(struct msc_connection *msc, struct msgb *msg)
struct sccp_parse_result result;
int rc;
- rc = bss_patch_filter_msg(msg, &result, BSS_DIR_BSC);
+ rc = bss_patch_filter_msg(msc->app, msg, &result, BSS_DIR_BSC);
if (rc == BSS_FILTER_RESET_ACK) {
LOGP(DMSC, LOGL_NOTICE, "Filtering reset ack from the MSC\n");