On 08/11/16 03:18 PM, Alexandre Viau wrote: > Hello, > >> PJSIP pj_ioqueue_sendto() fails in exception if addr argument >> is an IPv6 address and if there is a pending write. >> This is due to an PJ_ASSERT_RETURN() check not ported for IPv6. >> >> This patch adds this support to the check and change >> the internal write_operation structure to support generic IP >> addresses. > > The author is Guillaume Roguez <guillaume.rog...@savoirfairelinux.com> > (in CC). > > The patch was developed for Ring (https://ring.cx/) > > Please let us know if you have any questions, >
Erm. Now the patch is attached. I promise. -- Alexandre Viau alexan...@alexandreviau.net
--- a/pjlib/src/pj/ioqueue_common_abs.c 2015-11-05 23:18:46.000000000 -0500 +++ b/pjlib/src/pj/ioqueue_common_abs.c 2016-10-21 13:49:09.183662433 -0400 @@ -1048,5 +1048,6 @@ * Check that address storage can hold the address parameter. */ - PJ_ASSERT_RETURN(addrlen <= (int)sizeof(pj_sockaddr_in), PJ_EBUG); + PJ_ASSERT_RETURN((((pj_sockaddr*)addr)->addr.sa_family == pj_AF_INET() && addrlen <= (int)sizeof(pj_sockaddr_in)) || + (((pj_sockaddr*)addr)->addr.sa_family == pj_AF_INET6() && addrlen <= (int)sizeof(pj_sockaddr_in6)), PJ_EBUG); /* --- a/pjlib/src/pj/ioqueue_common_abs.h 2013-02-21 06:18:36.000000000 -0500 +++ b/pjlib/src/pj/ioqueue_common_abs.h 2016-10-21 14:04:04.148928591 -0400 @@ -64,5 +64,5 @@ pj_ssize_t written; unsigned flags; - pj_sockaddr_in rmt_addr; + pj_sockaddr rmt_addr; int rmt_addrlen; };
signature.asc
Description: OpenPGP digital signature