mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
So far, the users of the old non-pooled API were in charge of allocating the struct mgcp_client_conf by themselves, then init them using mgcp_client_conf_init(). This causes a major problem, since it makes it difficult to extend the struct mgcp_client_conf structure to add new features, which may happen frequently. The MGW pool API doesn't have this problem, because the struct mgcp_client_conf is allocated as parts/fields of private structs defined in internal headers. Only pointers to it are used in public headers. Since it still has to internally initialize the conf fields, we still need the API to initialize it internally, and hence why is it marked as DEPRECTED_OUTSIDE instead of DEPRECATED. While some programs already moved to the new MGW pool infrastructure, they still use the old APIs to accomodate for old config files in order to be back-compatible, hence most users of libosmo-mgcp-client are affected. Introduce an API to allocate the conf struct internally, which, while still breaking the ABI, allows for a more relaxed update path where it's possible to extend the struct mgcp_client_conf at the end. Eventually the non pooled API should be gone and the struct mgcp_client_conf can then be moved to a private header, but for now let's add this small feature to avoid major ABI breakage. Change-Id: Iba0853ed099a32cf1dde78c17e1b34343db41cfc
8 lines
212 B
C
8 lines
212 B
C
#include <osmocom/core/defs.h>
|
|
|
|
#if BUILDING_LIBOSMOMGCPCLIENT
|
|
# define OSMO_DEPRECATED_OUTSIDE_LIBOSMOMGCPCLIENT(text)
|
|
#else
|
|
# define OSMO_DEPRECATED_OUTSIDE_LIBOSMOMGCPCLIENT(text) OSMO_DEPRECATED(text)
|
|
#endif
|