diff src/director/login-connection.c @ 19438:f643e85f42ec

director: Don't treat empty hostname the same as having it. This could have caused "host not given" errors if an empty "host=" was sent to login process, even though hostip was also sent. Fixed this in two places, although either one should have been enough.
author Timo Sirainen <tss@iki.fi>
date Mon, 30 Nov 2015 21:36:51 +0200
parents 7f718c840aff
children 0f22db71df7a
line wrap: on
line diff
--- a/src/director/login-connection.c	Mon Nov 30 21:32:26 2015 +0200
+++ b/src/director/login-connection.c	Mon Nov 30 21:36:51 2015 +0200
@@ -153,7 +153,7 @@
 
 		secs = dir->set->director_user_expire / 2;
 		str_printfa(str, "%s\tproxy_refresh=%u\t", request->line, secs);
-		if (hostname == NULL)
+		if (hostname == NULL || hostname[0] == '\0')
 			str_printfa(str, "host=%s", net_ip2addr(ip));
 		else {
 			str_printfa(str, "host=%s\thostip=%s",