aboutsummaryrefslogtreecommitdiffstats
path: root/src/bss_patch.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2013-05-13 18:18:02 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-05-13 21:17:07 +0200
commitfe1550fed4146fd016f0d2cffc07f6ae8ed6b7fe (patch)
treee98a9d56e130cb3f0673eae80a1522b8685a2a3d /src/bss_patch.c
parentd2fdb2afbf1c495e3ab455dd90058501c14f57d4 (diff)
patching: Get the struct ss7_application down to the patching routine
Diffstat (limited to 'src/bss_patch.c')
-rw-r--r--src/bss_patch.c14
1 files changed, 8 insertions, 6 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;