diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-12-11 16:50:59 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-12-11 17:25:22 +0100 |
commit | d5c7582f72cea950508b6084ae7887fe4998e889 (patch) | |
tree | bcd4c70e2c668959d6c08a85ac7929a8ca7ac70d | |
parent | 4e13309104eee3f41f38fa485dd45dfa406bf64d (diff) |
bsc: dtap: Set subscr log context
Change-Id: I362a7d10f5ca9a95b594f7caafd7ed5b10fd059a
-rw-r--r-- | src/osmo-bsc/gsm_08_08.c | 11 | ||||
-rw-r--r-- | src/osmo-bsc/osmo_bsc_bssap.c | 3 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/osmo-bsc/gsm_08_08.c b/src/osmo-bsc/gsm_08_08.c index c3c500026..2c6a6892a 100644 --- a/src/osmo-bsc/gsm_08_08.c +++ b/src/osmo-bsc/gsm_08_08.c @@ -602,8 +602,10 @@ void bsc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, struct ms { int lu_cause; + log_set_context(LOG_CTX_BSC_SUBSCR, conn->bsub); + if (!msc_connected(conn)) - return; + goto done; LOGP(DMSC, LOGL_INFO, "Tx MSC DTAP LINK_ID=0x%02x\n", link_id); @@ -612,7 +614,7 @@ void bsc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, struct ms * to handle it. If it was handled we will return. */ if (handle_cc_setup(conn, msg) >= 1) - return; + goto done; /* Check the filter */ if (bsc_filter_data(conn, msg, &lu_cause) < 0) { @@ -620,7 +622,7 @@ void bsc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, struct ms conn->filter_state.con_type, lu_cause); bsc_clear_request(conn, 0); - return; + goto done; } bsc_scan_bts_msg(conn, msg); @@ -628,6 +630,9 @@ void bsc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, struct ms /* Store link_id in msg->cb */ OBSC_LINKID_CB(msg) = link_id; osmo_fsm_inst_dispatch(conn->fi, GSCON_EV_MO_DTAP, msg); +done: + log_set_context(LOG_CTX_BSC_SUBSCR, NULL); + return; } /*! BSC->MSC: RR conn has been cleared. */ diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 39425f6e9..b5ff152b8 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -980,6 +980,8 @@ int bsc_handle_udt(struct bsc_msc_data *msc, int bsc_handle_dt(struct gsm_subscriber_connection *conn, struct msgb *msg, unsigned int len) { + log_set_context(LOG_CTX_BSC_SUBSCR, conn->bsub); + if (len < sizeof(struct bssmap_header)) { LOGP(DMSC, LOGL_ERROR, "The header is too short.\n"); } @@ -997,6 +999,7 @@ int bsc_handle_dt(struct gsm_subscriber_connection *conn, gsm0808_bssap_name(msg->l3h[0])); } + log_set_context(LOG_CTX_BSC_SUBSCR, NULL); return -1; } |