[MERGED] osmo-msc[master]: cosmetic: a_iface: Harmonize log statements

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri Feb 9 02:25:27 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: cosmetic: a_iface: Harmonize log statements
......................................................................


cosmetic: a_iface: Harmonize log statements

Clean up the log statements in a_iface*.c, which was very inconsistent.
For example "BSC sending" is very confusing.  We are receiving from the BSC,
and it did already send the message, it is no longer in the process of
sending it if we have already received it in the MSC.

Change-Id: Id50e964d86713ae506d4e7657159797e09501d99
---
M src/libmsc/a_iface.c
M src/libmsc/a_iface_bssap.c
2 files changed, 13 insertions(+), 13 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c
index 64036be..0e6c247 100644
--- a/src/libmsc/a_iface.c
+++ b/src/libmsc/a_iface.c
@@ -179,7 +179,7 @@
 	uint8_t crm = 0x01;
 
 	OSMO_ASSERT(conn);
-	LOGPCONN(conn, LOGL_DEBUG, "Cipher Mode Command to BSC, %u ciphers (%s)",
+	LOGPCONN(conn, LOGL_DEBUG, "Tx BSSMAP CIPHER MODE COMMAND to BSC, %u ciphers (%s)",
 		 ei->perm_algo_len, osmo_hexdump_nospc(ei->perm_algo, ei->perm_algo_len));
 	LOGPC(DMSC, LOGL_DEBUG, " key %s\n", osmo_hexdump_nospc(ei->key, ei->key_len));
 
@@ -211,7 +211,7 @@
 	llist_for_each_entry(bsc_ctx, &gsm_network->a.bscs, list) {
 		if (a_reset_conn_ready(bsc_ctx->reset)) {
 			LOGP(DMSC, LOGL_DEBUG,
-			     "Passing paging message from MSC %s to BSC %s (imsi=%s, tmsi=0x%08x, lac=%u)\n",
+			     "Tx BSSMAP paging message from MSC %s to BSC %s (imsi=%s, tmsi=0x%08x, lac=%u)\n",
 			     osmo_sccp_addr_name(ss7, &bsc_ctx->msc_addr),
 			     osmo_sccp_addr_name(ss7, &bsc_ctx->bsc_addr), imsi, tmsi, lac);
 			msg = gsm0808_create_paging(imsi, &tmsi, &cil, NULL);
@@ -380,7 +380,7 @@
 	conn = trans->conn;
 	OSMO_ASSERT(conn);
 
-	LOGPCONN(conn, LOGL_DEBUG, "Sending Assignment Command to BSC\n");
+	LOGPCONN(conn, LOGL_DEBUG, "Tx BSSMAP ASSIGNMENT COMMAND to BSC\n");
 
 	/* Channel type */
 	rc = enc_channel_type(&ct, &trans->bearer_cap);
@@ -425,7 +425,7 @@
 {
 	struct msgb *msg;
 
-	LOGPCONN(conn, LOGL_INFO, "Sending Clear command to BSC\n");
+	LOGPCONN(conn, LOGL_INFO, "Tx BSSMAP CLEAR COMMAND to BSC\n");
 
 	msg = gsm0808_create_clear_command(GSM0808_CAUSE_CALL_CONTROL);
 	return osmo_sccp_tx_data_msg(conn->a.scu, conn->a.conn_id, msg);
@@ -448,7 +448,7 @@
 	/* Send reset to the remote BSC */
 	ss7 = osmo_ss7_instance_find(gsm_network->a.cs7_instance);
 	OSMO_ASSERT(ss7);
-	LOGP(DMSC, LOGL_NOTICE, "Sending RESET to BSC %s\n", osmo_sccp_addr_name(ss7, &bsc_ctx->bsc_addr));
+	LOGP(DMSC, LOGL_NOTICE, "Tx BSSMAP RESET to BSC %s\n", osmo_sccp_addr_name(ss7, &bsc_ctx->bsc_addr));
 	msg = gsm0808_create_reset();
 	osmo_sccp_tx_unitdata_msg(bsc_ctx->sccp_user, &bsc_ctx->msc_addr,
 				  &bsc_ctx->bsc_addr, msg);
diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c
index d865ea3..77a7779 100644
--- a/src/libmsc/a_iface_bssap.c
+++ b/src/libmsc/a_iface_bssap.c
@@ -110,7 +110,7 @@
 	ss7 = osmo_ss7_instance_find(network->a.cs7_instance);
 	OSMO_ASSERT(ss7);
 
-	LOGP(DMSC, LOGL_NOTICE, "Rx RESET from BSC %s, sending RESET ACK\n",
+	LOGP(DMSC, LOGL_NOTICE, "Rx BSSMAP RESET from BSC %s, sending RESET ACK\n",
 	     osmo_sccp_addr_name(ss7, &a_conn_info->bsc->bsc_addr));
 	osmo_sccp_tx_unitdata_msg(scu, &a_conn_info->bsc->msc_addr, &a_conn_info->bsc->bsc_addr,
 				  gsm0808_create_reset_ack());
@@ -164,7 +164,7 @@
 		return;
 	}
 
-	LOGP(DMSC, LOGL_DEBUG, "Rx BSC UDT BSSMAP %s\n", gsm0808_bssmap_name(msg->l3h[0]));
+	LOGP(DMSC, LOGL_DEBUG, "Rx BSSMAP UDT %s\n", gsm0808_bssmap_name(msg->l3h[0]));
 
 	switch (msg->l3h[0]) {
 	case BSS_MAP_MSG_RESET:
@@ -371,7 +371,7 @@
 	if (!conn)
 		goto fail;
 
-	LOGPCONN(conn, LOGL_DEBUG, "BSC sends clasmark update\n");
+	LOGPCONN(conn, LOGL_DEBUG, "Rx BSSMAP CLASSMARK UPDATE\n");
 
 	tlv_parse(&tp, gsm0808_att_tlvdef(), msg->l3h + 1, msgb_l3len(msg) - 1, 0, 0);
 	if (!TLVP_PRESENT(&tp, GSM0808_IE_CLASSMARK_INFORMATION_T2)) {
@@ -418,7 +418,7 @@
 	if (!conn)
 		goto fail;
 
-	LOGPCONN(conn, LOGL_DEBUG, "BSC sends cipher mode complete\n");
+	LOGPCONN(conn, LOGL_DEBUG, "Rx BSSMAP CIPHER MODE COMPLETE\n");
 
 	tlv_parse(&tp, gsm0808_att_tlvdef(), msg->l3h + 1, msgb_l3len(msg) - 1, 0, 0);
 
@@ -456,7 +456,7 @@
 	if (!conn)
 		goto fail;
 
-	LOGPCONN(conn, LOGL_NOTICE, "BSC sends cipher mode reject\n");
+	LOGPCONN(conn, LOGL_NOTICE, "RX BSSMAP CIPHER MODE REJECT\n");
 
 	tlv_parse(&tp, gsm0808_att_tlvdef(), msg->l3h + 1, msgb_l3len(msg) - 1, 0, 0);
 	if (!TLVP_PRESENT(&tp, BSS_MAP_MSG_CIPHER_MODE_REJECT)) {
@@ -491,7 +491,7 @@
 	if (!conn)
 		goto fail;
 
-	LOGPCONN(conn, LOGL_NOTICE, "BSC sends assignment failure message\n");
+	LOGPCONN(conn, LOGL_NOTICE, "Rx BSSMAP ASSIGNMENT FAILURE message\n");
 
 	tlv_parse(&tp, gsm0808_att_tlvdef(), msg->l3h + 1, msgb_l3len(msg) - 1, 0, 0);
 	if (!TLVP_PRESENT(&tp, GSM0808_IE_CAUSE)) {
@@ -628,7 +628,7 @@
 		return -1;
 	}
 
-	LOGP(DMSC, LOGL_DEBUG, "Rx MSC DT1 BSSMAP %s\n", gsm0808_bssmap_name(msg->l3h[0]));
+	LOGP(DMSC, LOGL_DEBUG, "Rx BSSMAP DT1 %s\n", gsm0808_bssmap_name(msg->l3h[0]));
 
 	switch (msg->l3h[0]) {
 	case BSS_MAP_MSG_CLEAR_RQST:
@@ -679,7 +679,7 @@
 		return -EINVAL;
 	}
 
-	LOGPCONN(conn, LOGL_DEBUG, "BSC sends layer 3 dtap\n");
+	LOGPCONN(conn, LOGL_DEBUG, "Rx DTAP %s\n", msgb_hexdump_l2(msg));
 
 	/* msc_dtap expects the dtap payload in l3h */
 	msg->l3h = msg->l2h + 3;

-- 
To view, visit https://gerrit.osmocom.org/6333
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id50e964d86713ae506d4e7657159797e09501d99
Gerrit-PatchSet: 2
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder


More information about the gerrit-log mailing list