Gustavo Garc=EDa Bernardo wrote:
> I think there is a problem with sipdht when the contact address is an
> IPv6 address (I=92m not really interested in IPv6 but my computer =
resolves
> localhost to ::1 by default). In peer.c Ln.120 there is a sip:%s:%s =
and
> url_format fails because that format is not valid for an IPv6 address. =
=20
Sounds reasonable.
> I have changed that line (peer.c Ln.120) to these ones, probably there
> is a more elegant solution(The same change is needed in =
get/put/walk.c):
Probably looking for a column is a good tradeoff; I don't think we
really need a complex function for parsing IPv6 addresses. We'll
integrate the patch in the next release (replacing strstr with strchr
which seems just more efficient, fwiw).
> if (strstr(laddr, ":") !=3D NULL)
>=20
> peer->p_contact =3D url_format(peer->p_home, =
"sip:[%s]:%s",
>=20
> laddr, lport);
>=20
> else
>=20
> peer->p_contact =3D url_format(peer->p_home, "sip:%s:%s",
>=20
> laddr, lport);
Thanks!
--=20
Ciao,
Enrico
Ahem.. Sorry, the notice below is not my fault :-(
--------------------------------------------------------------------
CONFIDENTIALITY NOTICE
This message and its attachments are addressed solely to the persons =
above and may contain confidential information. If you have received the =
message in error, be informed that any use of the content hereof is =
prohibited. Please return it immediately to the sender and delete the =
message. Should you have any questions, please contact us by replying to =
web...@te....
Thank you
www.telecomitalia.it
--------------------------------------------------------------------
=20
|