]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjproject: Add utility functions to convert between socket structures
authorSean Bright <sean.bright@gmail.com>
Tue, 28 Aug 2018 13:42:13 +0000 (09:42 -0400)
committerSean Bright <sean.bright@gmail.com>
Thu, 6 Sep 2018 18:29:44 +0000 (14:29 -0400)
commit3134fd95a9b3f36b0a7cb3fe3b3a492e268c9153
tree3ae592ff99f9f3df1a303d6657aaaddfbe0dece9
parentead0bc63daf801e0656643fd5f489bb455ae8197
res_pjproject: Add utility functions to convert between socket structures

Currently, to convert from a pj_sockaddr to an ast_sockaddr, the address
needs to be rendered to a string and then parsed into the correct
structure. This also involves a call to getaddrinfo(3). The same is true
for the inverse operation.

Instead, because we know the internal structure of both ast_sockaddr and
pj_sockaddr, we can translate directly between the two without the
need for an intermediate string.

Change-Id: If0fc4bba9643f755604c6ffbb0d7cc46020bc761
include/asterisk/res_pjproject.h
res/res_pjproject.c
res/res_pjproject.exports.in