From: Stefan Hacker Date: Sun, 13 Apr 2008 08:13:44 +0000 (+0200) Subject: teamspeak2 plugin: Flush the sending filehandle after writing to it. X-Git-Tag: collectd-4.4.0~39^2~4 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=f1b41d4848f3212824c6d267ced3ebe738aa4dd3;p=collectd.git teamspeak2 plugin: Flush the sending filehandle after writing to it. The only real Problem I found is that you forgot to flush the outgoing buffer after using fputs so nothing got sent. I added the fflush but now I'm not really sure what would happen if sending failed.... --- diff --git a/src/teamspeak2.c b/src/teamspeak2.c index 23a04d61..6f6dd04b 100644 --- a/src/teamspeak2.c +++ b/src/teamspeak2.c @@ -291,6 +291,7 @@ static int tss2_send_request (FILE *fh, const char *request) tss2_close_socket (); return (-1); } + fflush (fh); return (0); } /* int tss2_send_request */