On Fri, Dec 06, 2013 at 11:04:49AM +0100, Andreas Eversberg wrote:
you are right. i have no solution for this problem yet. at osmocombb/mobile i use queues to solve these kind of problems. whenever i want to handle something after osmo_select_main() was processed, i write into a specific queue. the main loop will call all dequeue functions in a loop, until all queues are empty and then continue with next osmo_select_main() call. one solution for handling the missing RELease CONFirm from BTS could be a timer with 0 duration. the timer will be handled right after the process you showed above is done. this timer could also have a duration of 1 second. if the BTS acutally sends a confirm, the timer could be stopped. this way it would also work with BTS firmwares that actually send a confirm.
Your last proposal is asking for introducing a race condition. This is a very bad idea. You have two options. You can use multiple 0 duration timers and fake the release confirm. The other option is to make the callers aware of missing release confirms.