mgcp_common, mgcp_udp_send: make parameter buf const

When mgcp_udp_send() is called, the memory where *buf is pointing to is
never modified. It should be marked as const.

Change-Id: Iac90de5beb19bf52586ac6ffeab9eb5152edf339
diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h
index 1de579a..29963cc 100644
--- a/include/osmocom/mgcp/mgcp.h
+++ b/include/osmocom/mgcp/mgcp.h
@@ -211,4 +211,4 @@
 
 int mgcp_create_bind(const char *source_addr, struct osmo_fd *fd, int port, uint8_t dscp,
 		     uint8_t prio);
-int mgcp_udp_send(int fd, struct osmo_sockaddr *addr, int port, char *buf, int len);
+int mgcp_udp_send(int fd, struct osmo_sockaddr *addr, int port, const char *buf, int len);
diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c
index abe01c9..e03c100 100644
--- a/src/libosmo-mgcp/mgcp_network.c
+++ b/src/libosmo-mgcp/mgcp_network.c
@@ -177,7 +177,7 @@
  *  \param[in] buf buffer that holds the data to be send.
  *  \param[in] len length of the data to be sent.
  *  \returns bytes sent, -1 on error. */
-int mgcp_udp_send(int fd, struct osmo_sockaddr *addr, int port, char *buf, int len)
+int mgcp_udp_send(int fd, struct osmo_sockaddr *addr, int port, const char *buf, int len)
 {
 	char ipbuf[INET6_ADDRSTRLEN];
 	size_t addr_len;