osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/30143 )


Change subject: ranap_common_cn: rename ctx -> priv
......................................................................

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
---
M include/osmocom/ranap/ranap_common.h
M include/osmocom/ranap/ranap_common_cn.h
M src/ranap_common_cn.c
3 files changed, 7 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/43/30143/1

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 @@
 #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 8f1260b..2b37a8e 100644
--- a/include/osmocom/ranap/ranap_common_cn.h
+++ b/include/osmocom/ranap/ranap_common_cn.h
@@ -14,7 +14,7 @@
        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 @@
        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);
diff --git a/src/ranap_common_cn.c b/src/ranap_common_cn.c
index c6ae8e8..bca49c5 100644
--- a/src/ranap_common_cn.c
+++ b/src/ranap_common_cn.c
@@ -310,7 +310,7 @@

 /* 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 @@
        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 @@

 /* 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 @@
        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);


--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/30143
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I929548e9224298be94f7d3ed4cdca0580147721d
Gerrit-Change-Number: 30143
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osm...@sysmocom.de>
Gerrit-MessageType: newchange

Reply via email to