Rename flush_socket() to flush_iob()
authorFabian Keil <fk@fabiankeil.de>
Thu, 11 Oct 2018 09:28:02 +0000 (11:28 +0200)
committerFabian Keil <fk@fabiankeil.de>
Mon, 12 Nov 2018 15:57:44 +0000 (16:57 +0100)
jcc.c
parsers.c
parsers.h

diff --git a/jcc.c b/jcc.c
index 6b6b374..64b3505 100644 (file)
--- a/jcc.c
+++ b/jcc.c
@@ -1974,7 +1974,7 @@ static int send_http_request(struct client_state *csp)
          csp->http->hostport);
    }
    else if (((csp->flags & CSP_FLAG_PIPELINED_REQUEST_WAITING) == 0)
-      && (flush_socket(csp->server_connection.sfd, csp->client_iob, 0) < 0))
+      && (flush_iob(csp->server_connection.sfd, csp->client_iob, 0) < 0))
    {
       write_failure = 1;
       log_error(LOG_LEVEL_CONNECT, "Failed sending request body to: %s: %E",
@@ -2522,8 +2522,7 @@ static void handle_established_connection(struct client_state *csp)
                   hdrlen = strlen(hdr);
 
                   if (write_socket_delayed(csp->cfd, hdr, hdrlen, write_delay)
-                   || ((flushed = flush_socket(csp->cfd, csp->iob,
-                         write_delay) < 0)
+                   || ((flushed = flush_iob(csp->cfd, csp->iob, write_delay) < 0)
                    || (write_socket_delayed(csp->cfd, csp->receive_buffer,
                          (size_t)len, write_delay))))
                   {
@@ -2731,7 +2730,7 @@ static void handle_established_connection(struct client_state *csp)
                 */
 
                if (write_socket_delayed(csp->cfd, hdr, strlen(hdr), write_delay)
-                  || ((len = flush_socket(csp->cfd, csp->iob, write_delay)) < 0))
+                  || ((len = flush_iob(csp->cfd, csp->iob, write_delay)) < 0))
                {
                   log_error(LOG_LEVEL_CONNECT, "write header to client failed: %E");
 
index f313f4f..699ae7c 100644 (file)
--- a/parsers.c
+++ b/parsers.c
@@ -249,7 +249,7 @@ static const add_header_func_ptr add_server_headers[] = {
 
 /*********************************************************************
  *
- * Function    :  flush_socket
+ * Function    :  flush_iob
  *
  * Description :  Write any pending "buffered" content.
  *
@@ -266,7 +266,7 @@ static const add_header_func_ptr add_server_headers[] = {
  *                file, the results are not portable.
  *
  *********************************************************************/
-long flush_socket(jb_socket fd, struct iob *iob, unsigned int delay)
+long flush_iob(jb_socket fd, struct iob *iob, unsigned int delay)
 {
    long len = iob->eod - iob->cur;
 
index 64bd2cf..d4cfc1c 100644 (file)
--- a/parsers.h
+++ b/parsers.h
@@ -49,7 +49,7 @@
 #define FILTER_CLIENT_HEADERS 0
 #define FILTER_SERVER_HEADERS 1
 
-extern long flush_socket(jb_socket fd, struct iob *iob, unsigned int delay);
+extern long flush_iob(jb_socket fd, struct iob *iob, unsigned int delay);
 extern jb_err add_to_iob(struct iob *iob, const size_t buffer_limit, char *src, long n);
 extern void clear_iob(struct iob *iob);
 extern jb_err decompress_iob(struct client_state *csp);