Real server auto-discovery support. First step.
commitcf8a20f90565d0018879f1671608e844adad3032
authorAnibal Avelar <aavelar@cofradia.org>
Tue, 19 Jan 2010 08:51:38 +0000 (19 02:51 -0600)
committerAnibal Avelar <aavelar@cofradia.org>
Tue, 19 Jan 2010 08:51:38 +0000 (19 02:51 -0600)
tree6dc07a109c444391363fa28e2f5b3075d7974f17
parent916cdb30e1e825713ace169f4542b8bb0174eb82
Real server auto-discovery support. First step.

The server auto-discovery support works only when the SRV records backs an errorfor each domain
{ "sipinternaltls", "tcp", SIPE_TRANSPORT_TLS }, /* for internal TLS connections */
{ "sipinternal",    "tcp", SIPE_TRANSPORT_TCP }, /* for internal TCP connections */
{ "sip",            "tls", SIPE_TRANSPORT_TLS }, /* for external TLS connections */
{ "sip",            "tcp", SIPE_TRANSPORT_TCP }, /*.for external TCP connections */

but the dns server retuns results doesn't mean we can connect to that server,
just mean the domain was resolve. Unfortunately the process stays in an infinite loop with this wrong domain.

The good way is to continue with the next domain if it fails to connect.
The process backs to the begin after the last domain in the list.
Works for me on OCS2007 with a external TLS server.
src/core/sipe.c
src/core/sipe.h