diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h index 1de579aaf..29963cc10 100644 --- a/include/osmocom/mgcp/mgcp.h +++ b/include/osmocom/mgcp/mgcp.h @@ -211,4 +211,4 @@ int mgcp_send_reset_all(struct mgcp_config *cfg); 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 abe01c949..e03c100a2 100644 --- a/src/libosmo-mgcp/mgcp_network.c +++ b/src/libosmo-mgcp/mgcp_network.c @@ -177,7 +177,7 @@ static uint32_t get_current_ts(unsigned codec_rate) * \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;