osmo-msc/src/libvlr
Neels Hofmeyr c5e0ace751 vlr_lu_fsm: guard against using the wrong fi
Various functions in vlr_lu_fsm.c belong to one of the four FSMs defined in
that file. After the recent error was uncovered where the lu_fsm called
lu_compl_fsm()'s termination function, I want to make sure it's correct.

Introduce distinct inline functions to dereference the respective fi->priv
pointers, each asserting that the fi indeed belongs to the proper FSM. Use
those *everywhere* to dereference fi->priv.

From this patch on, we are sure beyond doubt that we are not inadvertently
passing an fi pointer to the wrong FSM's handling functions, though we will
only catch this at runtime -- but then will immediately know the reason.

vlr_lu_fsm.c is the only file defining more than one FSM, so the other FSM
definitions are already reasonably safe.

Change-Id: I7419a780ff2d8b02efc4195bb1702818e4df181c
2018-03-02 03:21:14 +01:00
..
Makefile.am Migrate from OpenSSL to osmo_get_rand_id() 2017-12-27 11:11:14 +00:00
vlr.c GSUP: check osmo_gsup_encode() result 2018-02-08 09:29:50 +00:00
vlr_access_req_fsm.c Shift ciphering algorithm selection from VLR to MSC 2018-01-28 00:09:41 +00:00
vlr_access_req_fsm.h Add libvlr implementation 2017-07-21 18:32:03 +02:00
vlr_auth_fsm.c GSUP: check osmo_gsup_encode() result 2018-02-08 09:29:50 +00:00
vlr_auth_fsm.h Add libvlr implementation 2017-07-21 18:32:03 +02:00
vlr_core.h GSUP: check osmo_gsup_encode() result 2018-02-08 09:29:50 +00:00
vlr_lu_fsm.c vlr_lu_fsm: guard against using the wrong fi 2018-03-02 03:21:14 +01:00
vlr_lu_fsm.h Add libvlr implementation 2017-07-21 18:32:03 +02:00