From: René Scharfe Date: Sun, 15 Feb 2015 18:31:41 +0000 (+0100) Subject: daemon: look up client-supplied hostname lazily X-Git-Tag: v2.3.3~11^2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/edef953e482ce212b7d68bbe0f59e34b5552db3e?ds=inline;hp=edef953e482ce212b7d68bbe0f59e34b5552db3e daemon: look up client-supplied hostname lazily Look up canonical hostname and IP address using getaddrinfo(3) or gethostbyname(3) only if --interpolated-path or --access-hook were specified. Do that by introducing getter functions for canon_hostname and ip_address and using them for all read accesses. These wrappers call the new helper lookup_hostname(), which sets the variables only at its first call. Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano ---