I'm a bit confused about what we're trying to do here.  My understanding is that pj_getaddrinfo resolves host names to IP addresses, but all the comments and the log suggest that we are simply using it to translate an IPv4 or IPv6 IP address in string form in to a pj_sockaddr.  Looking at the call tree for the function, it looks like it will _can_ get called with a host name as it is called with whatever is supplied in the --localhost parameter on the sprout command line.  This used to be a hostname, but now I think we always set it to an IP address.  The net is that the use of pj_getaddrinfo is right but the comments/log are wrong/misleading, so can you update them to make it clear that host may be a domain name (which needs resolving) or it may be an address.