diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2017-06-30 17:28:10 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-07-12 23:42:47 +0200 |
commit | 85b22fefb4ebd88bcc80664c4e8cff75e13dd013 (patch) | |
tree | ac94c6367fe0c3c8dc3c9b6df30084d9513b7f8b /src | |
parent | 5529e44a2e28dc60a1af16ff5c23195f3a4211a3 (diff) |
osmo-bsc: use better msc identifier
Using the MSC numbers in the logtext is not very expressive,
ise the SCCP-Addresses instead.
When creating the sccp instance and user, use more parseable
string than "MSC No.: n"
Change-Id: Ib56134193ba95538f63e09dc702dc3ff0e827a02
Diffstat (limited to 'src')
-rw-r--r-- | src/osmo-bsc/osmo_bsc_bssap.c | 6 | ||||
-rw-r--r-- | src/osmo-bsc/osmo_bsc_sigtran.c | 18 |
2 files changed, 15 insertions, 9 deletions
diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index f37caa0d4..8d74e6e77 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -194,7 +194,8 @@ static int match_codec_pref(int *full_rate, enum gsm48_chan_mode *chan_mode, static int bssmap_handle_reset_ack(struct bsc_msc_data *msc, struct msgb *msg, unsigned int length) { - LOGP(DMSC, LOGL_NOTICE, "RESET ACK from MSC No.: %i\n", msc->nr); + LOGP(DMSC, LOGL_NOTICE, "RESET ACK from MSC: %s\n", + osmo_sccp_addr_dump(&msc->a.msc_addr)); /* Inform the FSM that controls the RESET/RESET-ACK procedure * that we have successfully received the reset-ack message */ @@ -207,7 +208,8 @@ static int bssmap_handle_reset_ack(struct bsc_msc_data *msc, static int bssmap_handle_reset(struct bsc_msc_data *msc, struct msgb *msg, unsigned int length) { - LOGP(DMSC, LOGL_NOTICE, "RESET from MSC No.: %i\n", msc->nr); + LOGP(DMSC, LOGL_NOTICE, "RESET from MSC: %s\n", + osmo_sccp_addr_dump(&msc->a.msc_addr)); /* Instruct the bsc to close all open sigtran connections and to * close all active channels on the BTS side as well */ diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c index ab61c3435..cc4637a37 100644 --- a/src/osmo-bsc/osmo_bsc_sigtran.c +++ b/src/osmo-bsc/osmo_bsc_sigtran.c @@ -86,7 +86,7 @@ static int pick_free_conn_id(struct bsc_msc_data *msc) static void osmo_bsc_sigtran_tx_reset(struct bsc_msc_data *msc) { struct msgb *msg; - LOGP(DMSC, LOGL_NOTICE, "Sending RESET to MSC No.: %i\n", msc->nr); + LOGP(DMSC, LOGL_NOTICE, "Sending RESET to MSC: %s\n", osmo_sccp_addr_dump(&msc->a.msc_addr)); msg = gsm0808_create_reset(); osmo_sccp_tx_unitdata_msg(msc->a.sccp_user, &msc->a.bsc_addr, &msc->a.msc_addr, msg); @@ -96,7 +96,7 @@ static void osmo_bsc_sigtran_tx_reset(struct bsc_msc_data *msc) void osmo_bsc_sigtran_tx_reset_ack(struct bsc_msc_data *msc) { struct msgb *msg; - LOGP(DMSC, LOGL_NOTICE, "Sending RESET ACK to MSC No.: %i\n", msc->nr); + LOGP(DMSC, LOGL_NOTICE, "Sending RESET ACK to MSC: %s\n", osmo_sccp_addr_dump(&msc->a.msc_addr)); msg = gsm0808_create_reset_ack(); osmo_sccp_tx_unitdata_msg(msc->a.sccp_user, &msc->a.bsc_addr, &msc->a.msc_addr, msg); @@ -231,7 +231,8 @@ enum bsc_con osmo_bsc_sigtran_new_conn(struct gsm_subscriber_connection *conn, s OSMO_ASSERT(conn); OSMO_ASSERT(msc); - LOGP(DMSC, LOGL_NOTICE, "Initializing resources for new SIGTRAN connection to MSC No.: %i...\n", msc->nr); + LOGP(DMSC, LOGL_NOTICE, "Initializing resources for new SIGTRAN connection to MSC: %s...\n", + osmo_sccp_addr_dump(&msc->a.msc_addr)); if (a_reset_conn_ready(msc->a.reset) == false) { LOGP(DMSC, LOGL_ERROR, "MSC is not connected. Dropping.\n"); @@ -284,7 +285,8 @@ int osmo_bsc_sigtran_open_conn(struct osmo_bsc_sccp_con *conn, struct msgb *msg) } conn_id = conn->conn_id; - LOGP(DMSC, LOGL_NOTICE, "Opening new SIGTRAN connection (id=%i) to MSC No.: %i...\n", conn_id, msc->nr); + LOGP(DMSC, LOGL_NOTICE, "Opening new SIGTRAN connection (id=%i) to MSC: %s\n", conn_id, + osmo_sccp_addr_dump(&msc->a.msc_addr)); rc = osmo_sccp_tx_conn_req_msg(msc->a.sccp_user, conn_id, &msc->a.bsc_addr, &msc->a.msc_addr, msg); @@ -312,7 +314,8 @@ int osmo_bsc_sigtran_send(struct osmo_bsc_sccp_con *conn, struct msgb *msg) conn_id = conn->conn_id; - LOGP(DMSC, LOGL_DEBUG, "Sending connection (id=%i) oriented data to MSC No.: %i...\n", conn_id, msc->nr); + LOGP(DMSC, LOGL_DEBUG, "Sending connection (id=%i) oriented data to MSC: %si\n", + conn_id, osmo_sccp_addr_dump(&msc->a.msc_addr)); rc = osmo_sccp_tx_data_msg(msc->a.sccp_user, conn_id, msg); @@ -430,8 +433,9 @@ int osmo_bsc_sigtran_init(struct llist_head *mscs) conn_id_counter = 0; llist_for_each_entry(msc, msc_list, entry) { - snprintf(msc_name, sizeof(msc_name), "MSC No.: %u", msc->nr); - LOGP(DMSC, LOGL_NOTICE, "Initializing SCCP connection to %s\n", msc_name); + snprintf(msc_name, sizeof(msc_name), "as-msc-%u", msc->nr); + LOGP(DMSC, LOGL_NOTICE, "Initializing SCCP connection to MSC %s (%s)\n", + osmo_sccp_addr_dump(&msc->a.msc_addr), msc_name); /* Check if the sccp-address */ if (test_addr(&msc->a.bsc_addr) < 0) { |