]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: h1: Fix debug warnings for h1 headers
authorDirkjan Bussink <d.bussink@gmail.com>
Fri, 14 Sep 2018 12:30:25 +0000 (14:30 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 9 Oct 2018 13:09:29 +0000 (15:09 +0200)
The wrong method was used to debug the h1m state here. This fixes both
the signature of the h1m method and also fixes the invocation to be
correct.

include/proto/h1.h
src/mux_h2.c

index 51e8834200d378109b9ba025543d0db0db201333..4914d51d1300fd6c0bd6d66fc95278e2d5bb69d7 100644 (file)
@@ -121,7 +121,7 @@ static inline const char *h1_msg_state_str(enum h1_state msg_state)
 }
 
 /* for debugging, reports the HTTP/1 message state name */
-static inline const char *h1m_state_str(enum h1_state msg_state)
+static inline const char *h1m_state_str(enum h1m_state msg_state)
 {
        switch (msg_state) {
        case H1_MSG_RQBEFORE:    return "MSG_RQBEFORE";
index 2839ea16aed2c55c4e2a2d046dd2e82be57cfca5..206ecb8f2972dc932e3a760d66c96fd668d2dd07 100644 (file)
@@ -3269,7 +3269,7 @@ static size_t h2s_frt_make_resp_headers(struct h2s *h2s, const struct buffer *bu
        /* now the h1m state is either H1_MSG_CHUNK_SIZE or H1_MSG_DATA */
 
  end:
-       //fprintf(stderr, "[%d] sent simple H2 response (sid=%d) = %d bytes (%d in, ep=%u, es=%s)\n", h2c->st0, h2s->id, outbuf.len, ret, h1m->err_pos, h1_msg_state_str(h1m->err_state));
+       //fprintf(stderr, "[%d] sent simple H2 response (sid=%d) = %d bytes (%d in, ep=%u, es=%s)\n", h2c->st0, h2s->id, outbuf.len, ret, h1m->err_pos, h1m_state_str(h1m->err_state));
        return ret;
  full:
        h1m_init_res(h1m);
@@ -3529,7 +3529,7 @@ static size_t h2s_frt_make_resp_data(struct h2s *h2s, const struct buffer *buf,
        }
 
  end:
-       trace("[%d] sent simple H2 DATA response (sid=%d) = %d bytes out (%u in, st=%s, ep=%u, es=%s, h2cws=%d h2sws=%d) data=%u", h2c->st0, h2s->id, size+9, (unsigned int)total, h1_msg_state_str(h1m->state), h1m->err_pos, h1_msg_state_str(h1m->err_state), h2c->mws, h2s->mws, (unsigned int)b_data(buf));
+       trace("[%d] sent simple H2 DATA response (sid=%d) = %d bytes out (%u in, st=%s, ep=%u, es=%s, h2cws=%d h2sws=%d) data=%u", h2c->st0, h2s->id, size+9, (unsigned int)total, h1m_state_str(h1m->state), h1m->err_pos, h1m_state_str(h1m->err_state), h2c->mws, h2s->mws, (unsigned int)b_data(buf));
        return total;
 }