aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2019-04-27 19:08:36 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2019-04-30 02:25:05 +0200
commit84274e4e9baf358409dd8df214e1e075ee6f7458 (patch)
tree24d11b283fe0047cecf7a6782594f8d7fe88775c
parentc5479fe08613feaf117ae5a6239f0341f90f910c (diff)
constify map_codec_to_pt() ptmap arg
-rw-r--r--include/osmocom/mgcp_client/mgcp_client.h2
-rw-r--r--src/libosmo-mgcp-client/mgcp_client.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/osmocom/mgcp_client/mgcp_client.h b/include/osmocom/mgcp_client/mgcp_client.h
index ac3e2b1be..9b57f1062 100644
--- a/include/osmocom/mgcp_client/mgcp_client.h
+++ b/include/osmocom/mgcp_client/mgcp_client.h
@@ -154,7 +154,7 @@ static inline const char *mgcp_client_cmode_name(enum mgcp_connection_mode mode)
}
enum mgcp_codecs map_str_to_codec(const char *str);
-unsigned int map_codec_to_pt(struct ptmap *ptmap, unsigned int ptmap_len,
+unsigned int map_codec_to_pt(const struct ptmap *ptmap, unsigned int ptmap_len,
enum mgcp_codecs codec);
enum mgcp_codecs map_pt_to_codec(struct ptmap *ptmap, unsigned int ptmap_len,
unsigned int pt);
diff --git a/src/libosmo-mgcp-client/mgcp_client.c b/src/libosmo-mgcp-client/mgcp_client.c
index 2dcab62a8..c28f5d222 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -93,7 +93,7 @@ enum mgcp_codecs map_str_to_codec(const char *str)
}
/* Check the ptmap for illegal mappings */
-static int check_ptmap(struct ptmap *ptmap)
+static int check_ptmap(const struct ptmap *ptmap)
{
/* Check if there are mappings that leave the IANA assigned dynamic
* payload type range. Under normal conditions such mappings should
@@ -122,7 +122,7 @@ error:
* \ptmap[in] ptmap_len length of the payload type map.
* \ptmap[in] codec the codec for which the payload type should be looked up.
* \returns assigned payload type */
-unsigned int map_codec_to_pt(struct ptmap *ptmap, unsigned int ptmap_len,
+unsigned int map_codec_to_pt(const struct ptmap *ptmap, unsigned int ptmap_len,
enum mgcp_codecs codec)
{
unsigned int i;