ReflectorLogic: Client side redundancy added by using DNS SRV records or
a locally specified list of hosts. Renamed configuration variables:
HOST -> HOSTS, PORT -> HOST_PORT. New configuration variables:
DNS_DOMAIN, HOST_PRIO, HOST_PRIO_INC, HOST_WEIGHT.
Rewritten the DNS resolver with support for more resource record types.
Specifically SRV record support were needed to implement the reflector
client side redundancy.
New class Async::TcpPrioClient for handling pools of servers to connect to.
The pool members can be specified using DNS SRV records or locally using the
HOSTS configuration variable.
New class Async::StateMachine used to build Hierarchial Finate State
Machines.
Add a new method, Async::TcpClientBase::remoteHostName(), so that we can
find out what hostname we used in the connect call.
Rename Async::TcpClientBase bind to setBindIp. Also add a bindIP()
method to access the bind address.
Pull request #202 implement a variant on DNS lookup in
AsyncCppDnsLookupWorker. That reimplementation had a couple of flaws
that this commit should fix.
- The new implementation would not sort out IPv6 answers and produced a
lot of duplicates due to getaddrinfo returning results for multiple
protocols and socket types.
- The new implementation may have had data races after removing the
mutexes. A pthread_join before accessing the shared data should take
care of this problem.
- Improved error/warning messages
Uninitialized pointer field -- The pointer field will point to an
arbitrary memory location, any attempt to write may cause corruption.
In Async::CppDnsLookupWorker::CppDnsLookupWorker: A pointer field is not
initialized in the constructor (CWE-457)
SvxLink to crash upon exiting the application but should otherwise
have casued no problems.
* Fixed an erroneous printout.
git-svn-id: svn://svn.code.sf.net/p/svxlink/svn/trunk@2113 f8843c6b-282e-0410-804b-c0d5895947d2
Everything compiles. Not tested much yet but it seems to work just fine.
git-svn-id: svn://svn.code.sf.net/p/svxlink/svn/branches/sigc++2@2060 f8843c6b-282e-0410-804b-c0d5895947d2
had been declared as "struct in_addr *h_addr". The problem was that
in the system include file "h_addr" is defined as a macro resolving
to "h_addr_list[0]" so the local declaration would be converted to
"struct in_addr *h_addr_list[0]". That is a list of size 0 of
pointers to "struct in_addr *". Not good...
git-svn-id: svn://svn.code.sf.net/p/svxlink/svn/trunk@1391 f8843c6b-282e-0410-804b-c0d5895947d2