bts: Call gprs_bssgp_destroy() in destructor
Change-Id: I7ed7f489f36f88277e2d5e393edcb339bf0cbba0changes/76/28076/1
parent
adcf27955d
commit
bf5e3cb3a4
|
@ -245,6 +245,8 @@ static int bts_talloc_destructor(struct gprs_rlcmac_bts* bts)
|
|||
bts->ms_store->cleanup();
|
||||
delete bts->ms_store;
|
||||
|
||||
gprs_bssgp_destroy(bts);
|
||||
|
||||
osmo_time_cc_cleanup(&bts->all_allocated_pdch);
|
||||
|
||||
if (bts->ratectrs) {
|
||||
|
|
|
@ -528,7 +528,6 @@ static void test_tbf_exhaustion()
|
|||
OSMO_ASSERT(rc == -EBUSY);
|
||||
fprintf(stderr, "=== end %s ===\n", __func__);
|
||||
|
||||
gprs_bssgp_destroy(bts);
|
||||
TALLOC_FREE(the_pcu);
|
||||
}
|
||||
|
||||
|
@ -623,7 +622,6 @@ static void test_tbf_dl_llc_loss()
|
|||
|
||||
fprintf(stderr, "=== end %s ===\n", __func__);
|
||||
|
||||
gprs_bssgp_destroy(bts);
|
||||
TALLOC_FREE(the_pcu);
|
||||
}
|
||||
|
||||
|
@ -2271,14 +2269,12 @@ static void test_tbf_gprs_egprs()
|
|||
OSMO_ASSERT(rc == 0);
|
||||
fprintf(stderr, "=== end %s ===\n", __func__);
|
||||
|
||||
gprs_bssgp_destroy(bts);
|
||||
TALLOC_FREE(the_pcu);
|
||||
}
|
||||
|
||||
static inline void ws_check(gprs_rlcmac_dl_tbf *dl_tbf, const char *test, uint8_t exp_slots, uint16_t exp_ws,
|
||||
bool free, bool end)
|
||||
bool free)
|
||||
{
|
||||
gprs_rlcmac_bts *bts = dl_tbf->bts;
|
||||
if (!dl_tbf) {
|
||||
fprintf(stderr, "%s(): FAILED (NULL TBF)\n", test);
|
||||
return;
|
||||
|
@ -2297,11 +2293,6 @@ static inline void ws_check(gprs_rlcmac_dl_tbf *dl_tbf, const char *test, uint8_
|
|||
|
||||
if (free)
|
||||
tbf_free(dl_tbf);
|
||||
|
||||
if (end) {
|
||||
fprintf(stderr, "=== end %s ===\n", test);
|
||||
gprs_bssgp_destroy(bts);
|
||||
}
|
||||
}
|
||||
|
||||
static void test_tbf_ws()
|
||||
|
@ -2337,7 +2328,7 @@ static void test_tbf_ws()
|
|||
ms = bts_alloc_ms(bts, ms_class, 0);
|
||||
dl_tbf = tbf_alloc_dl_tbf(bts, ms, 0, false);
|
||||
|
||||
ws_check(dl_tbf, __func__, 4, 64, true, false);
|
||||
ws_check(dl_tbf, __func__, 4, 64, true);
|
||||
|
||||
/* EGPRS-only */
|
||||
|
||||
|
@ -2345,7 +2336,8 @@ static void test_tbf_ws()
|
|||
ms = bts_alloc_ms(bts, ms_class, ms_class);
|
||||
dl_tbf = tbf_alloc_dl_tbf(bts, ms, 0, false);
|
||||
|
||||
ws_check(dl_tbf, __func__, 4, 128 + 4 * 64, true, true);
|
||||
ws_check(dl_tbf, __func__, 4, 128 + 4 * 64, true);
|
||||
fprintf(stderr, "=== end %s ===\n", __func__);
|
||||
TALLOC_FREE(the_pcu);
|
||||
}
|
||||
|
||||
|
@ -2384,12 +2376,13 @@ static void test_tbf_update_ws(void)
|
|||
ms = bts_alloc_ms(bts, ms_class, ms_class);
|
||||
dl_tbf = tbf_alloc_dl_tbf(bts, ms, 0, true);
|
||||
|
||||
ws_check(dl_tbf, __func__, 1, 128 + 1 * 64, false, false);
|
||||
ws_check(dl_tbf, __func__, 1, 128 + 1 * 64, false);
|
||||
|
||||
dl_tbf->update();
|
||||
|
||||
/* window size should be 384 */
|
||||
ws_check(dl_tbf, __func__, 4, 128 + 4 * 64, true, true);
|
||||
ws_check(dl_tbf, __func__, 4, 128 + 4 * 64, true);
|
||||
fprintf(stderr, "=== end %s ===\n", __func__);
|
||||
TALLOC_FREE(the_pcu);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue