Change in osmo-mgw[master]: constify map_codec_to_pt() ptmap arg

2019-04-30 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13813 )

Change subject: constify map_codec_to_pt() ptmap arg
..

constify map_codec_to_pt() ptmap arg

Change-Id: I030843d2d692b7a73cca8f427df070d2806ab695
---
M include/osmocom/mgcp_client/mgcp_client.h
M src/libosmo-mgcp-client/mgcp_client.c
2 files changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/include/osmocom/mgcp_client/mgcp_client.h 
b/include/osmocom/mgcp_client/mgcp_client.h
index ac3e2b1..9b57f10 100644
--- a/include/osmocom/mgcp_client/mgcp_client.h
+++ b/include/osmocom/mgcp_client/mgcp_client.h
@@ -154,7 +154,7 @@
 }

 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 2dcab62..c28f5d2 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -93,7 +93,7 @@
 }

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

--
To view, visit https://gerrit.osmocom.org/13813
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I030843d2d692b7a73cca8f427df070d2806ab695
Gerrit-Change-Number: 13813
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-mgw[master]: constify map_codec_to_pt() ptmap arg

2019-04-30 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13813 )

Change subject: constify map_codec_to_pt() ptmap arg
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/13813
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I030843d2d692b7a73cca8f427df070d2806ab695
Gerrit-Change-Number: 13813
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Tue, 30 Apr 2019 06:50:56 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-mgw[master]: constify map_codec_to_pt() ptmap arg

2019-04-29 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/13813


Change subject: constify map_codec_to_pt() ptmap arg
..

constify map_codec_to_pt() ptmap arg

Change-Id: I030843d2d692b7a73cca8f427df070d2806ab695
---
M include/osmocom/mgcp_client/mgcp_client.h
M src/libosmo-mgcp-client/mgcp_client.c
2 files changed, 3 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/13/13813/1

diff --git a/include/osmocom/mgcp_client/mgcp_client.h 
b/include/osmocom/mgcp_client/mgcp_client.h
index ac3e2b1..9b57f10 100644
--- a/include/osmocom/mgcp_client/mgcp_client.h
+++ b/include/osmocom/mgcp_client/mgcp_client.h
@@ -154,7 +154,7 @@
 }

 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 2dcab62..c28f5d2 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -93,7 +93,7 @@
 }

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

--
To view, visit https://gerrit.osmocom.org/13813
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I030843d2d692b7a73cca8f427df070d2806ab695
Gerrit-Change-Number: 13813
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr