pespin has uploaded this change for review. (
https://gerrit.osmocom.org/c/libosmo-sigtran/+/38662?usp=email )
Change subject: sigtran: Constify osmo_ss7_instance ptr in several APIs
......................................................................
sigtran: Constify osmo_ss7_instance ptr in several APIs
Change-Id: I3be025d4a26d12aa305efe0bf2b3955ca5af3da1
---
M include/osmocom/sigtran/osmo_ss7.h
M src/osmo_ss7.c
2 files changed, 6 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/62/38662/1
diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h
index 9da94b3..2babed9 100644
--- a/include/osmocom/sigtran/osmo_ss7.h
+++ b/include/osmocom/sigtran/osmo_ss7.h
@@ -25,9 +25,9 @@
int osmo_ss7_init(void);
int osmo_ss7_find_free_rctx(struct osmo_ss7_instance *inst);
-bool osmo_ss7_pc_is_local(struct osmo_ss7_instance *inst, uint32_t pc);
-int osmo_ss7_pointcode_parse(struct osmo_ss7_instance *inst, const char *str);
-int osmo_ss7_pointcode_parse_mask_or_len(struct osmo_ss7_instance *inst, const char
*in);
+bool osmo_ss7_pc_is_local(const struct osmo_ss7_instance *inst, uint32_t pc);
+int osmo_ss7_pointcode_parse(const struct osmo_ss7_instance *inst, const char *str);
+int osmo_ss7_pointcode_parse_mask_or_len(const struct osmo_ss7_instance *inst, const char
*in);
const char *osmo_ss7_pointcode_print_buf(char *buf, size_t buf_len, const struct
osmo_ss7_instance *inst, uint32_t pc);
const char *osmo_ss7_pointcode_print(const struct osmo_ss7_instance *inst, uint32_t pc);
const char *osmo_ss7_pointcode_print2(const struct osmo_ss7_instance *inst, uint32_t
pc);
diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index 0ed43ff..f82e28e 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -216,7 +216,7 @@
/* parse a point code according to the structure configured for this
* ss7_instance */
-int osmo_ss7_pointcode_parse(struct osmo_ss7_instance *inst, const char *str)
+int osmo_ss7_pointcode_parse(const struct osmo_ss7_instance *inst, const char *str)
{
unsigned int component[3];
const struct osmo_ss7_pc_fmt *pc_fmt = inst ? &inst->cfg.pc_fmt :
&default_pc_fmt;
@@ -288,7 +288,7 @@
return osmo_ss7_pointcode_print_buf(buf, sizeof(buf), inst, pc);
}
-int osmo_ss7_pointcode_parse_mask_or_len(struct osmo_ss7_instance *inst, const char *in)
+int osmo_ss7_pointcode_parse_mask_or_len(const struct osmo_ss7_instance *inst, const char
*in)
{
unsigned int width = osmo_ss7_pc_width(inst ? &inst->cfg.pc_fmt :
&default_pc_fmt);
@@ -696,7 +696,7 @@
trans_proto, proto);
}
-bool osmo_ss7_pc_is_local(struct osmo_ss7_instance *inst, uint32_t pc)
+bool osmo_ss7_pc_is_local(const struct osmo_ss7_instance *inst, uint32_t pc)
{
OSMO_ASSERT(ss7_initialized);
if (osmo_ss7_pc_is_valid(inst->cfg.primary_pc) && pc ==
inst->cfg.primary_pc)
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-sigtran/+/38662?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I3be025d4a26d12aa305efe0bf2b3955ca5af3da1
Gerrit-Change-Number: 38662
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>