ranap_common_cn: rename ctx -> priv

Rename the "ctx" argument of ranap_cn_rx_co and ranap_cn_rx_cl to "priv"
as it is private user data passed to the callback.

Change-Id: I929548e9224298be94f7d3ed4cdca0580147721d
This commit is contained in:
Oliver Smith 2022-11-14 10:53:20 +01:00
parent 02036368c9
commit de9fd95b2b
3 changed files with 7 additions and 7 deletions

View File

@ -597,7 +597,7 @@ extern int _ranap_DRANAP;
#define RANAP_DEBUG(x, args ...) DEBUGP(_ranap_DRANAP, x, ## args)
/* Callback to be used with decoder functions in ranap_common_cn.c ranap_common_ran.c */
typedef void (*ranap_handle_cb)(void *ctx, ranap_message *ranap_msg);
typedef void (*ranap_handle_cb)(void *priv, ranap_message *ranap_msg);
extern int asn1_xer_print;

View File

@ -14,7 +14,7 @@ int ranap_cn_rx_cl_decode(void *unused, ranap_message *message, uint8_t *data, s
OSMO_DEPRECATED("Use ranap_cn_rx_cl_decode_2() instead, the first arg is not used");
/* receive a connection-less RANAP message */
int ranap_cn_rx_cl(ranap_handle_cb cb, void *ctx, uint8_t *data, size_t len);
int ranap_cn_rx_cl(ranap_handle_cb cb, void *priv, uint8_t *data, size_t len);
/* free a decoded connection-oriented RANAP message */
void ranap_cn_rx_co_free(ranap_message *message);
@ -25,4 +25,4 @@ int ranap_cn_rx_co_decode(void *unused, ranap_message *message, uint8_t *data, s
OSMO_DEPRECATED("Use ranap_cn_rx_co_decode_2() instead, the first arg is not used");
/* receive a connection-oriented RANAP message */
int ranap_cn_rx_co(ranap_handle_cb cb, void *ctx, uint8_t *data, size_t len);
int ranap_cn_rx_co(ranap_handle_cb cb, void *priv, uint8_t *data, size_t len);

View File

@ -310,7 +310,7 @@ int ranap_cn_rx_co_decode(void *unused, ranap_message *message, uint8_t *data, s
/* receive a connection-oriented RANAP message and call
* cn_ranap_handle_co() with the resulting ranap_message struct */
int ranap_cn_rx_co(ranap_handle_cb cb, void *ctx, uint8_t *data, size_t len)
int ranap_cn_rx_co(ranap_handle_cb cb, void *priv, uint8_t *data, size_t len)
{
ranap_message message;
int rc;
@ -318,7 +318,7 @@ int ranap_cn_rx_co(ranap_handle_cb cb, void *ctx, uint8_t *data, size_t len)
rc = ranap_cn_rx_co_decode_2(&message, data, len);
if (rc == 0)
(*cb)(ctx, &message);
(*cb)(priv, &message);
else
LOGP(DRANAP, LOGL_ERROR, "Not calling cn_ranap_handle_co() due to rc=%d\n", rc);
@ -556,7 +556,7 @@ int ranap_cn_rx_cl_decode(void *unused, ranap_message *message, uint8_t *data, s
/* receive a connection-less RANAP message and call
* cn_ranap_handle_co() with the resulting ranap_message struct */
int ranap_cn_rx_cl(ranap_handle_cb cb, void *ctx, uint8_t *data, size_t len)
int ranap_cn_rx_cl(ranap_handle_cb cb, void *priv, uint8_t *data, size_t len)
{
ranap_message message;
int rc;
@ -564,7 +564,7 @@ int ranap_cn_rx_cl(ranap_handle_cb cb, void *ctx, uint8_t *data, size_t len)
rc = ranap_cn_rx_cl_decode_2(&message, data, len);
if (rc == 0)
(*cb)(ctx, &message);
(*cb)(priv, &message);
else
LOGP(DRANAP, LOGL_ERROR, "Not calling cn_ranap_handle_cl() due to rc=%d\n", rc);