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
This commit is contained in:
parent
59e7cf4437
commit
776846a0b9
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue