diff --git a/src/teamspeak2.c b/src/teamspeak2.c
index 7528406cc61a131e9fa276dcdacb1fe3345f23fc..2552ad305ffcaa51decb9ab490764a1cc907e4fb 100644 (file)
--- a/src/teamspeak2.c
+++ b/src/teamspeak2.c
#include "common.h"
#include "plugin.h"
-#include <arpa/inet.h>
#include <netinet/in.h>
+#include <arpa/inet.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
char *buffer_ptr;
buffer_ptr = fgets (buffer, sizeof (buffer), global_read_fh);
+ if (buffer_ptr == NULL)
+ {
+ WARNING ("teamspeak2 plugin: Unexpected EOF received "
+ "from remote host %s:%s.",
+ config_host ? config_host : DEFAULT_HOST,
+ config_port ? config_port : DEFAULT_PORT);
+ }
buffer[sizeof (buffer) - 1] = 0;
if (memcmp ("[TS]\r\n", buffer, 6) != 0)