Cause: errors in debug logging code make daemon go into infinite loop when debugging is enabled and DNS is misconfigured.
Consequence: XDMCP doesn't work, or works sporadically when debug mode is enabled. debug code prints NULL instead of remote server host in failure scenarios.
Fix: change debug code to not call itself and to not nullify/leak hostname.
Result: daemon doesn't lock up anymore and prints more intelligible error messages.