teamspeak2 plugin: Flush the sending filehandle after writing to it.
authorStefan Hacker <stefan.hacker@web.de>
Sun, 13 Apr 2008 08:13:44 +0000 (10:13 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sun, 13 Apr 2008 08:13:44 +0000 (10:13 +0200)
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....

src/teamspeak2.c

index 23a04d6..6f6dd04 100644 (file)
@@ -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 */