buffer: sync from upstream

Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
main
Jianhui Zhao 2020-02-07 17:29:46 +08:00
parent a0f308b0cb
commit 7ff34b7319
2 changed files with 5 additions and 5 deletions

@ -1 +1 @@
Subproject commit 7b1ba65e2c79be169ef49f1d43524151ab293302 Subproject commit 99adb71b0bd8cb2c09fd41e52334a9bcf8831327

View File

@ -341,10 +341,10 @@ static void conn_write_cb(struct ev_loop *loop, struct ev_io *w, int revents)
#if UHTTPD_SSL_SUPPORT #if UHTTPD_SSL_SUPPORT
if (conn->ssl) if (conn->ssl)
ret = buffer_pull_to_fd(&conn->wb, w->fd, buffer_length(&conn->wb), conn_ssl_write, conn->ssl); ret = buffer_pull_to_fd_ex(&conn->wb, w->fd, buffer_length(&conn->wb), conn_ssl_write, conn->ssl);
else else
#endif #endif
ret = buffer_pull_to_fd(&conn->wb, w->fd, buffer_length(&conn->wb), NULL, NULL); ret = buffer_pull_to_fd(&conn->wb, w->fd, buffer_length(&conn->wb));
if (ret < 0) { if (ret < 0) {
uh_log_err("write error: %s\n", strerror(errno)); uh_log_err("write error: %s\n", strerror(errno));
@ -404,10 +404,10 @@ static void conn_read_cb(struct ev_loop *loop, struct ev_io *w, int revents)
#if UHTTPD_SSL_SUPPORT #if UHTTPD_SSL_SUPPORT
if (conn->ssl) if (conn->ssl)
ret = buffer_put_fd(rb, w->fd, -1, &eof, conn_ssl_read, conn->ssl); ret = buffer_put_fd_ex(rb, w->fd, -1, &eof, conn_ssl_read, conn->ssl);
else else
#endif #endif
ret = buffer_put_fd(rb, w->fd, -1, &eof, NULL, NULL); ret = buffer_put_fd(rb, w->fd, -1, &eof);
if (ret < 0) { if (ret < 0) {
conn_error(conn, 500, NULL); conn_error(conn, 500, NULL);