Commit e3811ed7 authored by Julien Chaffraix's avatar Julien Chaffraix
Browse files

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.
parent dacc44dd
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -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
+0 −1
Original line number Diff line number Diff line
@@ -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 *);
+0 −11
Original line number Diff line number Diff line
@@ -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)