diff options
author | Daniel Stenberg <daniel@haxx.se> | 2000-09-25 22:15:56 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2000-09-25 22:15:56 +0000 |
commit | 1dac7f4d055242c66a8d87d77ae6b697f090d54a (patch) | |
tree | 60e34f24a5495d9974b36758359a1f913e1ff7a7 /lib/security.c | |
parent | ad01481b288c654c5b89bfd9c1035963d5d3589a (diff) | |
download | curl-1dac7f4d055242c66a8d87d77ae6b697f090d54a.tar.gz |
Martin Hedenfalk added sec_fflush_fd()
Diffstat (limited to 'lib/security.c')
-rw-r--r-- | lib/security.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/security.c b/lib/security.c index 81ce35ed8..793169f00 100644 --- a/lib/security.c +++ b/lib/security.c @@ -273,6 +273,20 @@ sec_fflush(struct connectdata *conn, FILE *F) } 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) { int len = conn->buffer_size; |