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
This commit is contained in:
Max 2018-02-08 16:50:20 +01:00
parent c2e3ff58bc
commit 9955cc4306
1 changed files with 4 additions and 3 deletions

View File

@ -456,9 +456,10 @@ static int l1sap_info_time_ind(struct gsm_bts *bts,
/* 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 */