pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-gprs/+/34312?usp=email )


Change subject: Fix wrong assignment between UL and DL tbf_allocation structs
......................................................................

Fix wrong assignment between UL and DL tbf_allocation structs

Change-Id: I077832afef6b72a11000a6d445262dff41c89ada
---
M src/rlcmac/tbf_ul_ass_fsm.c
1 file changed, 14 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/12/34312/1

diff --git a/src/rlcmac/tbf_ul_ass_fsm.c b/src/rlcmac/tbf_ul_ass_fsm.c
index 0f0f9ee..6262926 100644
--- a/src/rlcmac/tbf_ul_ass_fsm.c
+++ b/src/rlcmac/tbf_ul_ass_fsm.c
@@ -682,12 +682,15 @@
  * it, aka switch the FSM to trigger the 2hpase directly (tx Pkt Res Req) */
 int gprs_rlcmac_tbf_ul_ass_start_from_dl_tbf_ack_nack(struct 
gprs_rlcmac_ul_tbf *ul_tbf, const struct gprs_rlcmac_dl_tbf *dl_tbf)
 {
+       uint8_t tn;
        int rc;
        ul_tbf->ul_ass_fsm.dl_tbf = dl_tbf;
        /* FIXME: Ideally this should only be the TS where the PKT UL ASS was 
received... */
        ul_tbf->ul_ass_fsm.phase1_alloc.num_ts = dl_tbf->cur_alloc.num_ts;
-       memcpy(&ul_tbf->ul_ass_fsm.phase1_alloc.ts[0], &dl_tbf->cur_alloc.ts[0],
-              sizeof(ul_tbf->ul_ass_fsm.phase1_alloc.ts));
+       for (tn = 0; tn < ARRAY_SIZE(ul_tbf->ul_ass_fsm.phase1_alloc.ts); tn++) 
{
+               ul_tbf->ul_ass_fsm.phase1_alloc.ts[0].allocated = 
dl_tbf->cur_alloc.ts[0].allocated;
+               ul_tbf->ul_ass_fsm.phase1_alloc.ts[0].usf = 0xff;
+       }
        rc = osmo_fsm_inst_dispatch(ul_tbf->ul_ass_fsm.fi,
                                    GPRS_RLCMAC_TBF_UL_ASS_EV_START_FROM_DL_TBF,
                                    NULL);

--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/34312?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I077832afef6b72a11000a6d445262dff41c89ada
Gerrit-Change-Number: 34312
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to