pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/43256?usp=email )


Change subject: iu_helpers: Constify osmo_sockaddr input param
......................................................................

iu_helpers: Constify osmo_sockaddr input param

Change-Id: I86040373c075bbd84c2a21abc61a880e307fd4f8
---
M include/osmocom/ranap/iu_helpers.h
M src/iu_helpers.c
2 files changed, 7 insertions(+), 7 deletions(-)



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

diff --git a/include/osmocom/ranap/iu_helpers.h 
b/include/osmocom/ranap/iu_helpers.h
index 3a06c4b..f6140a0 100644
--- a/include/osmocom/ranap/iu_helpers.h
+++ b/include/osmocom/ranap/iu_helpers.h
@@ -17,7 +17,7 @@
                                   const RANAP_TransportLayerAddress_t 
*trasp_layer_addr);
 int ranap_transp_layer_addr_decode2(struct osmo_sockaddr *addr, bool 
*uses_x213_nsap,
                                    const RANAP_TransportLayerAddress_t 
*trasp_layer_addr);
-RANAP_TransportLayerInformation_t *ranap_new_transp_info_rtp(struct 
osmo_sockaddr *addr, bool use_x213_nsap);
-RANAP_TransportLayerInformation_t *ranap_new_transp_info_gtp(struct 
osmo_sockaddr *addr, uint32_t tei,
+RANAP_TransportLayerInformation_t *ranap_new_transp_info_rtp(const struct 
osmo_sockaddr *addr, bool use_x213_nsap);
+RANAP_TransportLayerInformation_t *ranap_new_transp_info_gtp(const struct 
osmo_sockaddr *addr, uint32_t tei,
                                                             bool 
use_x213_nsap);
-int ranap_new_transp_layer_addr(BIT_STRING_t *out, struct osmo_sockaddr *addr, 
bool use_x213_nsap);
+int ranap_new_transp_layer_addr(BIT_STRING_t *out, const struct osmo_sockaddr 
*addr, bool use_x213_nsap);
diff --git a/src/iu_helpers.c b/src/iu_helpers.c
index 705af31..07b6085 100644
--- a/src/iu_helpers.c
+++ b/src/iu_helpers.c
@@ -194,12 +194,12 @@
        return 0;
 }

-int ranap_new_transp_layer_addr(BIT_STRING_t *out, struct osmo_sockaddr *addr, 
bool use_x213_nsap)
+int ranap_new_transp_layer_addr(BIT_STRING_t *out, const struct osmo_sockaddr 
*addr, bool use_x213_nsap)
 {
        uint8_t *buf;
        unsigned int len;
        size_t ip_len;
-       uint8_t *ip_addr;
+       const uint8_t *ip_addr;
        uint16_t icp;

        switch (addr->u.sa.sa_family) {
@@ -244,7 +244,7 @@
        return 0;
 }

-RANAP_TransportLayerInformation_t *ranap_new_transp_info_rtp(struct 
osmo_sockaddr *addr, bool use_x213_nsap)
+RANAP_TransportLayerInformation_t *ranap_new_transp_info_rtp(const struct 
osmo_sockaddr *addr, bool use_x213_nsap)
 {
        RANAP_TransportLayerInformation_t *tli;
        uint8_t binding_id[4] = { 0 };
@@ -275,7 +275,7 @@
        return tli;
 }

-RANAP_TransportLayerInformation_t *ranap_new_transp_info_gtp(struct 
osmo_sockaddr *addr, uint32_t tei,
+RANAP_TransportLayerInformation_t *ranap_new_transp_info_gtp(const struct 
osmo_sockaddr *addr, uint32_t tei,
                                                             bool use_x213_nsap)
 {
        RANAP_TransportLayerInformation_t *tli = CALLOC(1, sizeof(*tli));

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

Gerrit-MessageType: newchange
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I86040373c075bbd84c2a21abc61a880e307fd4f8
Gerrit-Change-Number: 43256
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>

Reply via email to