pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-hnodeb/+/28192 )

Change subject: rtp: Update code to libosmogsm IuUP API changes
......................................................................

rtp: Update code to libosmogsm IuUP API changes

NOTICE: This commit implies an API change when using libosmogsm.
However, the previous API was never available in any libosmogsm release,
and only available in both libosmogsm and osmo-hnodeb master, so we are
only breaking compatibility between different master versions, which is
acceptable.

Related: SYS#5969
Change-Id: Ia26a945147d68511bb1750d51ed91909e48b4139
---
M src/osmo-hnodeb/rtp.c
1 file changed, 10 insertions(+), 6 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, approved



diff --git a/src/osmo-hnodeb/rtp.c b/src/osmo-hnodeb/rtp.c
index 0435c81..c0d96a9 100644
--- a/src/osmo-hnodeb/rtp.c
+++ b/src/osmo-hnodeb/rtp.c
@@ -45,13 +45,17 @@
        cfg->supported_versions_mask = ce_req->supported_versions_mask;
        cfg->num_rfci = ce_req->num_rfci;
        cfg->num_subflows = ce_req->num_subflows;
-       OSMO_ASSERT(cfg->num_rfci <= ARRAY_SIZE(cfg->subflow_sizes));
-       OSMO_ASSERT(cfg->num_subflows <= ARRAY_SIZE(cfg->subflow_sizes[0]));
-       for (i = 0; i < cfg->num_rfci; i++)
-               memcpy(&cfg->subflow_sizes[i][0], &ce_req->subflow_sizes[i][0], 
cfg->num_subflows*sizeof(uint16_t));
        cfg->IPTIs_present = ce_req->IPTIs_present;
-       if (cfg->IPTIs_present)
-               memcpy(cfg->IPTIs, ce_req->IPTIs, cfg->num_rfci);
+       OSMO_ASSERT(cfg->num_rfci <= ARRAY_SIZE(cfg->rfci));
+       OSMO_ASSERT(cfg->num_subflows <= 
ARRAY_SIZE(cfg->rfci[0].subflow_sizes));
+       for (i = 0; i < cfg->num_rfci; i++) {
+               cfg->rfci[i].used = true;
+               cfg->rfci[i].id = i; /* Assume RFC ID from position, llsk_audio 
doesn't provide info */
+               if (cfg->IPTIs_present)
+                       cfg->rfci[i].IPTI = ce_req->IPTIs[i];
+               if (cfg->num_subflows > 0)
+                       memcpy(&cfg->rfci[i].subflow_sizes[0], 
&ce_req->subflow_sizes[i][0], cfg->num_subflows*sizeof(uint16_t));
+       }

        cfg->t_init = (struct osmo_iuup_rnl_config_timer){ .t_ms = 
IUUP_TIMER_INIT_T_DEFAULT, .n_max = IUUP_TIMER_INIT_N_DEFAULT };
        cfg->t_ta   = (struct osmo_iuup_rnl_config_timer){ .t_ms = 
IUUP_TIMER_TA_T_DEFAULT, .n_max = IUUP_TIMER_TA_N_DEFAULT };

--
To view, visit https://gerrit.osmocom.org/c/osmo-hnodeb/+/28192
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hnodeb
Gerrit-Branch: master
Gerrit-Change-Id: Ia26a945147d68511bb1750d51ed91909e48b4139
Gerrit-Change-Number: 28192
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to