diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-10-06 04:39:08 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-10-06 04:39:08 +0800 |
commit | 0f349f2c6df7c73653de8ef8b9082aab7a83c085 (patch) | |
tree | ca3c4282b188280c206a07f88b41c6b4094dd288 | |
parent | 377ba4293abaa4cc98b7bdee57e98528acbf023f (diff) |
ussd: Add the hook where we can capture the Location Updating Request
-rw-r--r-- | include/bsc_ussd.h | 2 | ||||
-rw-r--r-- | src/bsc_ussd.c | 16 | ||||
-rw-r--r-- | src/msc_conn.c | 5 |
3 files changed, 23 insertions, 0 deletions
diff --git a/include/bsc_ussd.h b/include/bsc_ussd.h index 57eb4d4..69ad93c 100644 --- a/include/bsc_ussd.h +++ b/include/bsc_ussd.h @@ -22,4 +22,6 @@ #ifndef bsc_ussd_h #define bsc_ussd_h +int bsc_ussd_handle_out_msg(struct bsc_data *bsc, struct sccp_parse_result *result, struct msgb *msg); + #endif diff --git a/src/bsc_ussd.c b/src/bsc_ussd.c index 42d41c4..5c7e962 100644 --- a/src/bsc_ussd.c +++ b/src/bsc_ussd.c @@ -21,3 +21,19 @@ */ #include <bsc_data.h> + +/* + * Check the msg and identify a Location Updating Request and see if the + * LAC is different to this one and then mark the CR message. + */ +int bsc_ussd_handle_out_msg(struct bsc_data *bsc, struct sccp_parse_result *result, + struct msgb *msg) +{ + /* Only search for this in the CR message */ + if (sccp_determine_msg_type(msg) != SCCP_MSG_TYPE_CR) + return 0; + + /* now check the kind of GSM message */ + + return 0; +} diff --git a/src/msc_conn.c b/src/msc_conn.c index 902546f..b03dc5f 100644 --- a/src/msc_conn.c +++ b/src/msc_conn.c @@ -21,6 +21,7 @@ */ #include <bsc_data.h> +#include <bsc_ussd.h> #include <bss_patch.h> #include <bssap_sccp.h> #include <ipaccess.h> @@ -203,6 +204,8 @@ static int ipaccess_a_fd_cb(struct bsc_fd *bfd) update_con_state(rc, &result, msg, 1, 0); sls = sls_for_src_ref(result.destination_local_reference); + /* Check for Location Update Accept */ + /* patch a possible PC */ bss_rewrite_header_to_bsc(msg, link->opc, link->dpc); @@ -593,6 +596,8 @@ void msc_send_msg(struct bsc_data *bsc, int rc, struct sccp_parse_result *result return; } + bsc_ussd_handle_out_msg(bsc, result, _msg); + msg = msgb_alloc_headroom(4096, 128, "SCCP to MSC"); if (!msg) { LOGP(DMSC, LOGL_ERROR, "Failed to alloc MSC msg.\n"); |