aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2022-11-14 10:53:20 +0100
committerOliver Smith <osmith@sysmocom.de>2022-11-15 11:16:21 +0100
commit05bb6ad563c178de70645e815557fe225cd078b9 (patch)
tree7510245e07f5f23a5e88f912eb80e0da8be8e4fc
parent8b6dad3331eab339a7ffea7c22ed1830fe9ced60 (diff)
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
-rw-r--r--include/osmocom/ranap/ranap_common.h2
-rw-r--r--include/osmocom/ranap/ranap_common_cn.h4
-rw-r--r--src/ranap_common_cn.c8
3 files changed, 7 insertions, 7 deletions
diff --git a/include/osmocom/ranap/ranap_common.h b/include/osmocom/ranap/ranap_common.h
index 5b052f0..5727c0d 100644
--- a/include/osmocom/ranap/ranap_common.h
+++ b/include/osmocom/ranap/ranap_common.h
@@ -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;
diff --git a/include/osmocom/ranap/ranap_common_cn.h b/include/osmocom/ranap/ranap_common_cn.h
index dfc5c3d..5f82378 100644
--- a/include/osmocom/ranap/ranap_common_cn.h
+++ b/include/osmocom/ranap/ranap_common_cn.h
@@ -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_decode2() 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_decode2() 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);
diff --git a/src/ranap_common_cn.c b/src/ranap_common_cn.c
index bbc3784..56ac4e8 100644
--- a/src/ranap_common_cn.c
+++ b/src/ranap_common_cn.c
@@ -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_decode2(&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_decode2(&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);