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:30:12 +0000 (13:30 -0500)
commit600c5d79fd433f8eae3ca20c600ee3ed33894531
tree1c690cdb50d698e4567ad5fb25ad7596c36827d7
parent16df18215575dfb8622b9d1c9552627723d4803b
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