const char *buffer, size_t length)
{
/* FIXME: Check for overflow */
- ssize_t len = conn->buffer_size;
- int tx = 0;
+ ssize_t tx = 0, len = conn->buffer_size;
- len -= conn->mech->overhead(conn->app_data, conn->data_prot, len);
+ len -= conn->mech->overhead(conn->app_data, conn->data_prot,
+ curlx_sztosi(len));
if(len <= 0)
len = length;
while(length) {
/* FIXME: Check for overflow. */
len = length;
}
- do_sec_send(conn, fd, buffer, len);
+ do_sec_send(conn, fd, buffer, curlx_sztosi(len));
length -= len;
buffer += len;
tx += len;