[MERGED] openbsc[master]: Expand chan allocation logging

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri Feb 10 12:25:29 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: Expand chan allocation logging
......................................................................


Expand chan allocation logging

Log more data related to channel allocation:
- channel type
- number of paging attempts
- timers fired

Change-Id: Ib417a9c942c17b902dd80ff555cd9da5f91bff48
---
M openbsc/src/libbsc/abis_rsl.c
M openbsc/src/libbsc/bsc_api.c
M openbsc/src/libbsc/paging.c
M openbsc/src/libmsc/gsm_04_08.c
4 files changed, 14 insertions(+), 8 deletions(-)

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



diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index 8a6b111..cc190eb 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -1659,7 +1659,9 @@
 static void t3101_expired(void *data)
 {
 	struct gsm_lchan *lchan = data;
-
+	LOGP(DRSL, LOGL_NOTICE,
+	     "%s T3101 expired: no response to IMMEDIATE ASSIGN\n",
+	     gsm_lchan_name(lchan));
 	rsl_rf_chan_release(lchan, 1, SACCH_DEACTIVATE);
 }
 
@@ -1667,7 +1669,9 @@
 static void t3111_expired(void *data)
 {
 	struct gsm_lchan *lchan = data;
-
+	LOGP(DRSL, LOGL_NOTICE,
+	     "%s T3111 expired: releasing RF Channel\n",
+	     gsm_lchan_name(lchan));
 	rsl_rf_chan_release(lchan, 0, SACCH_NONE);
 }
 
diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c
index 8a4c85f..7a48296 100644
--- a/openbsc/src/libbsc/bsc_api.c
+++ b/openbsc/src/libbsc/bsc_api.c
@@ -397,7 +397,8 @@
 			handle_mr_config(conn, conn->lchan, full_rate);
 
 		LOGP(DMSC, LOGL_NOTICE,
-		     "Sending ChanModify for speech: %s on channel %s\n",
+		     "Sending %s ChanModify for speech: %s on channel %s\n",
+		     gsm_lchan_name(conn->lchan),
 		     get_value_string(gsm48_chan_mode_names, chan_mode),
 		     get_value_string(gsm_chan_t_names, conn->lchan->type));
 		gsm48_lchan_modify(conn->lchan, chan_mode);
diff --git a/openbsc/src/libbsc/paging.c b/openbsc/src/libbsc/paging.c
index fcb4deb..8c30637 100644
--- a/openbsc/src/libbsc/paging.c
+++ b/openbsc/src/libbsc/paging.c
@@ -79,8 +79,9 @@
 
 	log_set_context(BSC_CTX_SUBSCR, request->subscr);
 
-	LOGP(DPAG, LOGL_INFO, "Going to send paging commands: imsi: '%s' tmsi: '0x%x'\n",
-		request->subscr->imsi, request->subscr->tmsi);
+	LOGP(DPAG, LOGL_INFO, "Going to send paging commands: imsi: %s tmsi: "
+	     "0x%x for ch. type %d (attempt %d)\n", request->subscr->imsi,
+	     request->subscr->tmsi, request->chan_type, request->attempts);
 
 	if (request->subscr->tmsi == GSM_RESERVED_TMSI)
 		mi_len = gsm48_generate_mid_from_imsi(mi, request->subscr->imsi);
@@ -376,11 +377,11 @@
 			req = NULL;
 
 			if (conn && cbfn) {
-				LOGP(DPAG, LOGL_DEBUG, "Stop paging on bts %d, calling cbfn.\n", bts->nr);
+				LOGP(DPAG, LOGL_DEBUG, "Stop paging %s on bts %d, calling cbfn.\n", subscr->imsi, bts->nr);
 				cbfn(GSM_HOOK_RR_PAGING, GSM_PAGING_SUCCEEDED,
 					  msg, conn, param);
 			} else
-				LOGP(DPAG, LOGL_DEBUG, "Stop paging on bts %d silently.\n", bts->nr);
+				LOGP(DPAG, LOGL_DEBUG, "Stop paging %s on bts %d silently.\n", subscr->imsi, bts->nr);
 			break;
 		}
 	}
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index e5402d0..1a64731 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -1483,7 +1483,7 @@
 	apdu_len = gh->data[1];
 	apdu_data = gh->data+2;
 
-	DEBUGP(DRR, "RX APPLICATION INFO id/flags=0x%02x apdu_len=%u apdu=%s",
+	DEBUGP(DRR, "RX APPLICATION INFO id/flags=0x%02x apdu_len=%u apdu=%s\n",
 		apdu_id_flags, apdu_len, osmo_hexdump(apdu_data, apdu_len));
 
 	return db_apdu_blob_store(conn->subscr, apdu_id_flags, apdu_len, apdu_data);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib417a9c942c17b902dd80ff555cd9da5f91bff48
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder


More information about the gerrit-log mailing list