Not quite - TAILQ_INSERT_SORTED inserts ota before the first element in the list that is blocked longer than ota. This is fine as long as the rest of the list is still sorted, but it break in this situation if we have two adapters scanning:

* Adapter 0 starts on the top entry
* Adapter 1 starts on the second entry
* Scan on adapter 0 calls epggrab_ota_complete() - this blocks the top entry until a time t0
* Scan on adapter 1 calls epggrab_ota_complete() - this blocks the second entry until a time t1 > t0
* dvb_adapter_mux_scanner() runs for adapter 0 and calls _epggrab_ota_finished() (via epggrab_mux_stop()) . This leaves the queue unchanged, because the top entry can run before the second entry. But there may be still more entries ready to run.

My code inserts ota after the last element that is blocked shorter than ota to make sure that all entries that can run before ota runs for the next time *will* run before it.