X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fteamspeak2.c;h=502145d36dc89bd459be4f32636da13747510665;hb=61a1fa91ba73e4fe3a34949f77c5f017056f2b7a;hp=d4bf2aa40dcb1d3172fce8f6d4878f19461e296c;hpb=a940e2555464956ae7b61d8d0d742f2acc001c5f;p=collectd.git diff --git a/src/teamspeak2.c b/src/teamspeak2.c index d4bf2aa4..502145d3 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)