aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--http.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/http.c b/http.c
index 0b058dc..f6c5d5f 100644
--- a/http.c
+++ b/http.c
@@ -1312,7 +1312,7 @@ static int send_payload(struct http_ctx *const h,
return start_response(h);
}
-static int update_lstate(struct http_ctx *const h, bool *const close,
+static int update_lstate(struct http_ctx *const h,
int (*const f)(struct http_ctx *), const char *const buf,
size_t *const sz)
{
@@ -1932,8 +1932,8 @@ static int read_mf_body_boundary(struct http_ctx *const h,
return 0;
}
-static int read_multiform(struct http_ctx *const h, bool *const close,
- const char *const buf, size_t *const sz)
+static int read_multiform(struct http_ctx *const h, const char *const buf,
+ size_t *const sz)
{
struct multiform *const m = &h->ctx.u.mf;
int res;
@@ -1960,8 +1960,8 @@ static int read_multiform(struct http_ctx *const h, bool *const close,
return 0;
}
-static int read_body_to_mem(struct http_ctx *const h, bool *const close,
- const char *const buf, size_t *const sz)
+static int read_body_to_mem(struct http_ctx *const h, const char *const buf,
+ size_t *const sz)
{
struct ctx *const c = &h->ctx;
struct payload *const p = &c->payload;
@@ -2085,8 +2085,8 @@ static int read_put_body_to_file(struct http_ctx *const h,
return 0;
}
-static int read_to_file(struct http_ctx *const h, bool *const close,
- const char *const buf, size_t *const sz)
+static int read_to_file(struct http_ctx *const h, const char *const buf,
+ size_t *const sz)
{
struct ctx *const c = &h->ctx;
struct payload *const p = &c->payload;
@@ -2117,19 +2117,19 @@ static int read_to_file(struct http_ctx *const h, bool *const close,
return 0;
}
-static int read_body(struct http_ctx *const h, bool *const close,
- const char *const buf, size_t *const sz)
+static int read_body(struct http_ctx *const h, const char *const buf,
+ size_t *const sz)
{
const struct ctx *const c = &h->ctx;
switch (c->op)
{
case HTTP_OP_POST:
- return c->boundary ? read_multiform(h, close, buf, sz)
- : read_body_to_mem(h, close, buf, sz);
+ return c->boundary ? read_multiform(h, buf, sz)
+ : read_body_to_mem(h, buf, sz);
case HTTP_OP_PUT:
- return read_to_file(h, close, buf, sz);
+ return read_to_file(h, buf, sz);
case HTTP_OP_GET:
/* Fall through. */
@@ -2152,18 +2152,18 @@ static int process_line(struct http_ctx *const h)
return state[h->ctx.state](h);
}
-static int read_buf(struct http_ctx *const h, bool *const close,
- const char *const buf, size_t *const sz)
+static int read_buf(struct http_ctx *const h, const char *const buf,
+ size_t *const sz)
{
switch (h->ctx.state)
{
case START_LINE:
/* Fall through. */
case HEADER_CR_LINE:
- return update_lstate(h, close, process_line, buf, sz);
+ return update_lstate(h, process_line, buf, sz);
case BODY_LINE:
- return read_body(h, close, buf, sz);
+ return read_body(h, buf, sz);
}
fprintf(stderr, "%s: unexpected state %d\n", __func__, h->ctx.state);
@@ -2182,7 +2182,7 @@ int http_read(struct http_ctx *const h, bool *const close)
while (rem)
{
- const int ret = read_buf(h, close, &buf[r - rem], &rem);
+ const int ret = read_buf(h, &buf[r - rem], &rem);
if (ret)
{