Calling l1ctl_server_shutdown() whenever the server is not initialized
will result in accessing uninitialized values. This can happen if we
goto exit before l1ctl_server_start() was called.
Initializing the server with zeroes is not an option, because we need
to initilize llist_head and osmo_fd structures with proper values.
Allocate and initialize struct l1ctl_server in l1ctl_server_start(),
deinitialize and free() in l1ctl_server_shutdown().
Change-Id: Idf13914fd0b0ae09b2ce5ece1f4203ebcae05d6e
Related: CID#275254
Ideally, FBSB procedure should be implemented as a state of trxcon's
FSM. For now let's simply move the related fields to trxcon_inst.
Remove l1ctl_shutdown_cb() as it's not needed anymore.
Change-Id: I92b50cf1bb36886fbe3d6460af3c0b1c57256ae8
trxcon consists of the following three main components:
* the L1 TDMA scheduler (libl1sched),
* L1 interface (TRXC/TRXD over UDP),
* L2 interface (L1CTL).
In [1] and [2] the L1 scheduler was abstracted out from both L1
and L2 interfaces and separated into a library, so it does not
use the TRXC/TRXD nor L1CTL related API directly.
This change is the next step towards the goal of having all three
components abstracted from each other. Moreover, this patch brings
us closer to another goal of being able to support multiple L1CTL
connections (each having its own scheduler).
The idea is to give both L1 and L2 interfaces access to the
'trxcon_inst' structure, which basically groups all three components
mentioned above into a single piece. The end goal is to eliminate
direct interaction between the interfaces, and the scheduler, so that
one could easily replace TRXC/TRXD and/or L1CTL with something else.
Change-Id: I23319951c56577085e1092669b5534f9d6bda48d
Related: [1] I31f77976a7a225ef292fe6dcd583513aec97ed44
Related: [2] I001fb7bc2663eea308b5a8882746ed9863f2c2f8