From 1dac7f4d055242c66a8d87d77ae6b697f090d54a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 25 Sep 2000 22:15:56 +0000 Subject: Martin Hedenfalk added sec_fflush_fd() --- lib/security.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/security.c') diff --git a/lib/security.c b/lib/security.c index 81ce35ed8..793169f00 100644 --- a/lib/security.c +++ b/lib/security.c @@ -272,6 +272,20 @@ sec_fflush(struct connectdata *conn, FILE *F) return 0; } +int +sec_fflush_fd(struct connectdata *conn, int fd) +{ + if(conn->data_prot != prot_clear) { + if(conn->out_buffer.index > 0){ + sec_write(conn, fd, + conn->out_buffer.data, conn->out_buffer.index); + conn->out_buffer.index = 0; + } + sec_send(conn, fd, NULL, 0); + } + return 0; +} + int sec_write(struct connectdata *conn, int fd, char *buffer, int length) { -- cgit v1.2.3