From 7ff34b7319f086317b30da8501bbf06a0955331d Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Fri, 7 Feb 2020 17:29:46 +0800 Subject: [PATCH] buffer: sync from upstream Signed-off-by: Jianhui Zhao --- src/buffer | 2 +- src/connection.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/buffer b/src/buffer index 7b1ba65..99adb71 160000 --- a/src/buffer +++ b/src/buffer @@ -1 +1 @@ -Subproject commit 7b1ba65e2c79be169ef49f1d43524151ab293302 +Subproject commit 99adb71b0bd8cb2c09fd41e52334a9bcf8831327 diff --git a/src/connection.c b/src/connection.c index c495038..63a1dc1 100644 --- a/src/connection.c +++ b/src/connection.c @@ -341,10 +341,10 @@ static void conn_write_cb(struct ev_loop *loop, struct ev_io *w, int revents) #if UHTTPD_SSL_SUPPORT 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 #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) { 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 (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 #endif - ret = buffer_put_fd(rb, w->fd, -1, &eof, NULL, NULL); + ret = buffer_put_fd(rb, w->fd, -1, &eof); if (ret < 0) { conn_error(conn, 500, NULL);