[PATCH] osmo-bts[master]: osmo-bts-trx: ignore frame offset error on startup

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Max gerrit-no-reply at lists.osmocom.org
Thu Feb 8 15:52:27 UTC 2018


Review at  https://gerrit.osmocom.org/6322

osmo-bts-trx: ignore frame offset error on startup

Previously we always printed error on startup:
l1sap.c:461 Invalid condition detected: Frame difference is 627202-0=627202 > 1!

This is expected and of little practical use. Let's suppress it
by checking that FN was actually initialized.

Change-Id: I4f7cf285e437db0e980e1a2a3ab48a7255945448
---
M src/common/l1sap.c
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/22/6322/1

diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index d3f3111..e181a73 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -456,9 +456,10 @@
 	/* Calculate and check frame difference */
 	frames_expired = info_time_ind->fn - btsb->gsm_time.fn;
 	if (frames_expired > 1) {
-		LOGP(DL1P, LOGL_ERROR,
-		     "Invalid condition detected: Frame difference is %"PRIu32"-%"PRIu32"=%d > 1!\n",
-	             info_time_ind->fn, btsb->gsm_time.fn, frames_expired);
+		if (btsb->gsm_time.fn)
+			LOGP(DL1P, LOGL_ERROR,
+			     "Invalid condition detected: Frame difference is %"PRIu32"-%"PRIu32"=%d > 1!\n",
+			     info_time_ind->fn, btsb->gsm_time.fn, frames_expired);
 	}
 
 	/* Update our data structures with the current GSM time */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4f7cf285e437db0e980e1a2a3ab48a7255945448
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>



More information about the gerrit-log mailing list