From 0997c1bbb745384069a55e59a209d7ac52876bac Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 2 Feb 2008 12:27:11 +0100 Subject: [PATCH] http_send.c: Get rid of write_ok(). Just use http_write() instead of write(). --- http_send.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/http_send.c b/http_send.c index 32907150..a19836af 100644 --- a/http_send.c +++ b/http_send.c @@ -164,7 +164,7 @@ static int queue_chunk_or_shutdown(struct http_client *hc, long unsigned chunk_n return ret; } -static void http_send( long unsigned current_chunk, +static void http_send(long unsigned current_chunk, __a_unused long unsigned chunks_sent, const char *buf, size_t len) { struct http_client *hc, *tmp; @@ -191,13 +191,7 @@ static void http_send( long unsigned current_chunk, } if (!len) continue; - if (!ret || write_ok(hc->fd) <= 0) { - queue_chunk_or_shutdown(hc, current_chunk, 0); - continue; - } -// PARA_DEBUG_LOG("sending %d -> %s\n", len, remote_name(hc->fd)); - ret = write(hc->fd, buf, len); -// PARA_DEBUG_LOG("ret: %d\n", ret); + ret = http_write(hc->fd, buf, len); if (ret < 0) { http_shutdown_client(hc, "send error"); continue; -- 2.39.5