Assign same timer id after release (was not really a bug)

master
Ismael Gomez 7 years ago
parent f470645e90
commit d873eaca5c

@ -151,15 +151,15 @@ public:
fprintf(stderr, "Error getting unique timer id: no more timers available\n");
return 0;
} else {
while(used_timers[next_timer]) {
next_timer++;
if (next_timer >= nof_timers) {
next_timer=0;
for (uint32_t i=0;i<nof_timers;i++) {
if (!used_timers[i]) {
nof_used_timers++;
return i;
}
}
used_timers[next_timer] = true;
nof_used_timers++;
return next_timer;
fprintf(stderr, "Error getting unique timer id: no more timers available but nof_used_timers=%d, nof_timers=%d\n",
nof_used_timers, nof_timers);
return 0;
}
}
private:

@ -2836,7 +2836,7 @@ void rrc::rrc_meas::remove_meas_id(uint32_t measId) {
if (active.count(measId)) {
mac_timers->timer_get(active[measId].periodic_timer)->stop();
mac_timers->timer_release_id(active[measId].periodic_timer);
log_h->info("MEAS: Removed measId=%d\n", measId);
log_h->info("MEAS: Removed measId=%d, timer_id=%d\n", measId, active[measId].periodic_timer);
active.erase(measId);
} else {
log_h->warning("MEAS: Removing unexistent measId=%d\n", measId);
@ -2846,7 +2846,7 @@ void rrc::rrc_meas::remove_meas_id(uint32_t measId) {
void rrc::rrc_meas::remove_meas_id(std::map<uint32_t, meas_t>::iterator it) {
mac_timers->timer_get(it->second.periodic_timer)->stop();
mac_timers->timer_release_id(it->second.periodic_timer);
log_h->info("MEAS: Removed measId=%d\n", it->first);
log_h->info("MEAS: Removed measId=%d, timer_id=%d\n", it->first, active[measId].periodic_timer);
active.erase(it);
}

Loading…
Cancel
Save