aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Chaffraix <julien.chaffraix@gmail.com>2010-09-26 22:35:00 -0700
committerJulien Chaffraix <julien.chaffraix@gmail.com>2010-09-28 22:05:24 -0700
commite3811ed7c34ed1818dc246af54460fea0fc52c02 (patch)
tree01a2f14c15034d2db39e7938e2e7bd79031a45bd
parentdacc44ddc2920cb1b2e3550bc803f7521c3166fa (diff)
security.c: Remove Curl_sec_fflush_fd.
The current implementation would make us send wrong data on a closed socket. We don't buffer our data so the method can be safely removed.
-rw-r--r--lib/ftp.c4
-rw-r--r--lib/krb4.h1
-rw-r--r--lib/security.c11
3 files changed, 0 insertions, 16 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index e3f93870f..f1376d730 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -3076,10 +3076,6 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
/* free the dir tree and file parts */
freedirs(ftpc);
-#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
- Curl_sec_fflush_fd(conn, conn->sock[SECONDARYSOCKET]);
-#endif
-
/* shut down the socket to inform the server we're done */
#ifdef _WIN32_WCE
diff --git a/lib/krb4.h b/lib/krb4.h
index 5dc3971e4..5da1dc6ef 100644
--- a/lib/krb4.h
+++ b/lib/krb4.h
@@ -47,7 +47,6 @@ extern struct Curl_sec_client_mech Curl_krb5_client_mech;
#endif
CURLcode Curl_krb_kauth(struct connectdata *conn);
-int Curl_sec_fflush_fd(struct connectdata *conn, int fd);
int Curl_sec_fprintf (struct connectdata *, FILE *, const char *, ...);
int Curl_sec_getc (struct connectdata *conn, FILE *);
int Curl_sec_putc (struct connectdata *conn, int, FILE *);
diff --git a/lib/security.c b/lib/security.c
index 5becb0c87..303a1bec6 100644
--- a/lib/security.c
+++ b/lib/security.c
@@ -345,17 +345,6 @@ static ssize_t sec_write(struct connectdata *conn, curl_socket_t fd,
return tx;
}
-/* FIXME: fd should be a curl_socket_t */
-int Curl_sec_fflush_fd(struct connectdata *conn, int fd)
-{
- if(conn->data_prot == prot_clear)
- return 0;
-
- /* Force a flush by trying to send no data */
- do_sec_send(conn, fd, NULL, 0);
- return 0;
-}
-
/* Matches Curl_send signature */
static ssize_t sec_send(struct connectdata *conn, int sockindex,
const void *buffer, size_t len, CURLcode *err)