Fix request reference value in gsm48_match_ra()

Do not overwrite the given request reference pointer with the history
buffer's reference. This makes no sense.

Without this fix only the response to the first access burst could be
matched correctly.

Change-Id: Iec636d368e20030beac2861bff61b1a06e7b4821
This commit is contained in:
Andreas Eversberg 2023-09-11 14:34:08 +02:00
parent bb32882adc
commit c9f90c4d5a
1 changed files with 6 additions and 7 deletions

View File

@ -2372,13 +2372,12 @@ static int gsm48_match_ra(struct osmocom_ms *ms, struct gsm48_req_ref *ref, uint
for (i = 0; i < hist_num; i++) {
/* filter confirmed RACH requests only */
if (rr->cr_hist[i].valid && ref->ra == rr->cr_hist[i].ref.ra) {
ia_t1 = ref->t1;
ia_t2 = ref->t2;
ia_t3 = (ref->t3_high << 3) | ref->t3_low;
ref = &rr->cr_hist[i].ref;
cr_t1 = ref->t1;
cr_t2 = ref->t2;
cr_t3 = (ref->t3_high << 3) | ref->t3_low;
ia_t1 = ref->t1;
ia_t2 = ref->t2;
ia_t3 = (ref->t3_high << 3) | ref->t3_low;
cr_t1 = rr->cr_hist[i].ref.t1;
cr_t2 = rr->cr_hist[i].ref.t2;
cr_t3 = (rr->cr_hist[i].ref.t3_high << 3) | rr->cr_hist[i].ref.t3_low;
if (ia_t1 == cr_t1 && ia_t2 == cr_t2
&& ia_t3 == cr_t3) {
LOGP(DRR, LOGL_INFO, "request %02x matches "