Skip to content

Commit 4e061b1

Browse files
carlo-galcodebot
authored andcommitted
sched: fix failing unittest
Signed-off-by: Carlo Galiotto <[email protected]>
1 parent fe354f3 commit 4e061b1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/scheduler/ue_scheduling/dl_logical_channel_manager.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class dl_logical_channel_manager
3535
void set_status(lcid_t lcid, bool active)
3636
{
3737
srsran_sanity_check(lcid < MAX_NOF_RB_LCIDS, "Max LCID value 32 exceeded");
38-
channels[lcid].active;
38+
channels[lcid].active = active;
3939
}
4040

4141
/// \brief Update the configurations of the provided lists of bearers.
@@ -44,7 +44,9 @@ class dl_logical_channel_manager
4444
/// \brief Verifies if logical channel is activated for DL.
4545
bool is_active(lcid_t lcid) const
4646
{
47-
srsran_sanity_check(lcid < MAX_NOF_RB_LCIDS, "Max LCID value 32 exceeded");
47+
if (lcid > LCID_MAX_DRB) {
48+
return false;
49+
}
4850
return channels[lcid].active;
4951
}
5052

@@ -103,7 +105,6 @@ class dl_logical_channel_manager
103105
/// \brief Last DL buffer status for given LCID (MAC subheader included).
104106
unsigned pending_bytes(lcid_t lcid) const
105107
{
106-
srsran_sanity_check(lcid < MAX_NOF_RB_LCIDS, "Max LCID value 32 exceeded");
107108
return is_active(lcid) ? get_mac_sdu_required_bytes(channels[lcid].buf_st) : 0;
108109
}
109110

0 commit comments

Comments
 (0)