mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
Merge "netsock2: backport ast_sockaddr_copy_sockaddr to asterisk 13." into 13
This commit is contained in:
@@ -140,6 +140,22 @@ static inline void ast_sockaddr_setnull(struct ast_sockaddr *addr)
|
||||
addr->len = 0;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief
|
||||
* Copies the data from a sockaddr to an ast_sockaddr
|
||||
*
|
||||
* \param dst The destination ast_sockaddr
|
||||
* \param src The source sockaddr
|
||||
* \param len Length of the value stored in sockaddr
|
||||
* \retval void
|
||||
*/
|
||||
static inline void ast_sockaddr_copy_sockaddr(struct ast_sockaddr *dst,
|
||||
struct sockaddr *src, socklen_t len)
|
||||
{
|
||||
memcpy(dst, src, len);
|
||||
dst->len = len;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \since 1.8
|
||||
*
|
||||
|
Reference in New Issue
Block a user