1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

Martin Hedenfalk added sec_fflush_fd()

This commit is contained in:
Daniel Stenberg 2000-09-25 22:15:56 +00:00
parent ad01481b28
commit 1dac7f4d05
2 changed files with 15 additions and 0 deletions

View File

@ -272,6 +272,20 @@ sec_fflush(struct connectdata *conn, FILE *F)
return 0; 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 int
sec_write(struct connectdata *conn, int fd, char *buffer, int length) sec_write(struct connectdata *conn, int fd, char *buffer, int length)
{ {

View File

@ -94,6 +94,7 @@ void delete_ftp_command(void);
int sec_fflush (struct connectdata *conn, FILE *); int sec_fflush (struct connectdata *conn, FILE *);
int sec_fflush_fd(struct connectdata *conn, int fd);
int sec_fprintf (struct connectdata *, FILE *, const char *, ...); int sec_fprintf (struct connectdata *, FILE *, const char *, ...);
int sec_getc (struct connectdata *conn, FILE *); int sec_getc (struct connectdata *conn, FILE *);
int sec_putc (struct connectdata *conn, int, FILE *); int sec_putc (struct connectdata *conn, int, FILE *);