pespin submitted this change.
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(-)
diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h
index 4aa1e1c..898c903 100644
--- a/include/osmocom/sigtran/osmo_ss7.h
+++ b/include/osmocom/sigtran/osmo_ss7.h
@@ -23,9 +23,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 8f6d417..65fff7c 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -205,7 +205,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;
@@ -277,7 +277,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);
@@ -778,7 +778,7 @@
return osmo_ss7_xua_server_find2(inst, trans_proto, proto, local_port);
}
-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 change 38662. To unsubscribe, or for help writing mail filters, visit settings.