VS2013 complains it may loss data.
Indeed why cat to int64 since all variables are already sie_t?

static void forward_put_data(struct connection *conn) {

  struct iobuf *io = &conn->ns_conn->recv_iobuf;

  size_t k = conn->cl < (int64_t) io->len ? conn->cl : (int64_t) io->len;   // 
To write

  int n = write(conn->endpoint.fd, io->buf, k);   // Write them!

  if (n > 0) {

    iobuf_remove(io, n);

    conn->cl -= n;

  }

  if (conn->cl <= 0) {

    close_local_endpoint(conn);

  }

}


Cheers

-- 
You received this message because you are subscribed to the Google Groups 
"mongoose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mongoose-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to