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