X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fteamspeak2.c;h=2552ad305ffcaa51decb9ab490764a1cc907e4fb;hb=ba2ee9aec4c0454eed8f29b4c6ce96c6fc372346;hp=a78e700f03a67962132bb9be8dd372dcb68144d5;hpb=619f181d3d5f4f6c90cb8ae228527302ddd35819;p=collectd.git diff --git a/src/teamspeak2.c b/src/teamspeak2.c index a78e700f..2552ad30 100644 --- a/src/teamspeak2.c +++ b/src/teamspeak2.c @@ -299,6 +299,13 @@ static int tss2_get_socket (FILE **ret_read_fh, FILE **ret_write_fh) 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)