summaryrefslogtreecommitdiff
path: root/src/master
diff options
context:
space:
mode:
authorBen Millwood <thebenmachine@gmail.com>2009-10-03 13:07:49 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:16:29 +0000
commit2663c248d3d5070a769788baaa00a024a702ecb5 (patch)
tree4e76bc35a88d2f5f47d89e6f0c0ba6f211120efc /src/master
parent8230fd582a135ac6d83cea335895657c283f923c (diff)
* Make the master server require hostname in infoResponses
Diffstat (limited to 'src/master')
-rw-r--r--src/master/messages.c8
-rw-r--r--src/master/stats.c1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/master/messages.c b/src/master/messages.c
index 563023ef..a86e7957 100644
--- a/src/master/messages.c
+++ b/src/master/messages.c
@@ -364,6 +364,14 @@ static void HandleInfoResponse (server_t* server, const char* msg)
peer_address, value);
return;
}
+ // some people enjoy making it hard to find them
+ value = SearchInfostring (msg, "hostname");
+ if (!value || !value[0])
+ {
+ MsgPrint (MSG_ERROR, "ERROR: no hostname from %s\n",
+ peer_address, value);
+ return;
+ }
// Check and save the values of "protocol" and "maxclients"
value = SearchInfostring (msg, "protocol");
diff --git a/src/master/stats.c b/src/master/stats.c
index 98ebb32e..61d8c140 100644
--- a/src/master/stats.c
+++ b/src/master/stats.c
@@ -25,6 +25,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <time.h>