From 50c7d987aa279354815170ea6ea746643bd823f4 Mon Sep 17 00:00:00 2001 From: NĂ©lio Laranjeiro Date: Mon, 25 Feb 2013 17:25:29 +0100 Subject: cesar/ce/rx/bitloading: return NULL if no NSR blocks are available, refs #3776 When no NSR blocks are available the function ce_rx_bl_get_nsr should return NULL. This can happen if the CP receive a vs_get_nsr.req MME and the CP preempts the CE before it starts using the NSR received. --- cesar/ce/rx/bitloading/test/src/test_bl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cesar/ce/rx/bitloading/test') diff --git a/cesar/ce/rx/bitloading/test/src/test_bl.c b/cesar/ce/rx/bitloading/test/src/test_bl.c index dfd219016a..d71e13e058 100644 --- a/cesar/ce/rx/bitloading/test/src/test_bl.c +++ b/cesar/ce/rx/bitloading/test/src/test_bl.c @@ -772,6 +772,7 @@ test_suite_ce_rx_bl_get_snr (test_t t) blk_t * const fake_nsr = INVALID_PTR; bl.noise_nrj = fake_nsr; + bl.noise_nrj_blk_count = 1; test_begin (t, "check SNR available only in certain states") { @@ -792,6 +793,7 @@ test_suite_ce_rx_bl_get_snr (test_t t) /* Clean. */ bl.noise_nrj = NULL; + bl.noise_nrj_blk_count = 0; ce_rx_bitloading_uninit (&bl); } -- cgit v1.2.3