Dear maintainer,
This is a composite of three bug reports, all closely related to the use of
unix domain sockets instead of tcp.
1. The tcp listener cannot be disabled, due to an erroneous reapplication of the
default port. The attached patch should fix this (previously, this variable was
a string describing the port, rather than the actual integer value).
2. When a unix domain socket connection is created, szClientName may be null.
The current behavior is to set that string to "", which prevents it from being
handled correctly by the rest of the infrastructure. The attached patch sets
the string to the sentinel value "0", which should never be a valid hostname or
ip address. This may not be ideal, but it does illustrate problem and one solution.
3. acngtool cannot properly connect to a unix domain socket. Unix domain socket
connections cannot be reused, as alluded to in the empty TUdsFactory::RecycleIdleConnection.
However, the udsconnection::tcpconnect function (which does in fact create a unix
domain socket connection), passes a request to get / from the acng server.
This dooms that connection to uselessness, and results in acngtool falling back to
the tcp connection code path. If that is also disabled, the tool hangs for a
very long time. The attached patch avoids this first / lookup, making the tool
work with unix domain sockets.
Best,
Antonio Russo