]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: build: Fix compilation with debug mode enabled
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 20 Jul 2018 08:16:29 +0000 (10:16 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 20 Jul 2018 08:45:20 +0000 (10:45 +0200)
It remained some fragments of the old buffers API in debug messages, here and
there.

This was caused by the recent buffer API changes, no backport is needed.

src/backend.c
src/cli.c
src/flt_spoe.c
src/proto_http.c
src/stream.c
src/tcp_rules.c

index e94c4c9b345bbeceb24cc48c9b55968c126d7ef8..b2b7ba580cf7676a29835d02e196934a885737c1 100644 (file)
@@ -1399,13 +1399,13 @@ int tcp_persist_rdp_cookie(struct stream *s, struct channel *req, int an_bit)
        uint32_t addr;
        char *p;
 
-       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%d analysers=%02x\n",
+       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%lu analysers=%02x\n",
                now_ms, __FUNCTION__,
                s,
                req,
                req->rex, req->wex,
                req->flags,
-               req->buf->i,
+               ci_data(req),
                req->analysers);
 
        if (s->flags & SF_ASSIGNED)
index 0d3c95c228064fcc77945b480ec9c48aacc7183f..d028429605fdf8e537cf94bf8a6a11a59d37b6e5 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -764,9 +764,9 @@ static void cli_io_handler(struct appctx *appctx)
        }
 
  out:
-       DPRINTF(stderr, "%s@%d: st=%d, rqf=%x, rpf=%x, rqh=%d, rqs=%d, rh=%d, rs=%d\n",
+       DPRINTF(stderr, "%s@%d: st=%d, rqf=%x, rpf=%x, rqh=%lu, rqs=%lu, rh=%lu, rs=%lu\n",
                __FUNCTION__, __LINE__,
-               si->state, req->flags, res->flags, req->buf->i, req->buf->o, res->buf->i, res->buf->o);
+               si->state, req->flags, res->flags, ci_data(req), co_data(req), ci_data(res), co_data(res));
 }
 
 /* This is called when the stream interface is closed. For instance, upon an
index 63482f5704aed51c237d564f8b0d948c5326eb93..73e8f623a382db7e4c6b3797aef99a3fd08682fe 100644 (file)
@@ -2264,7 +2264,7 @@ spoe_encode_messages(struct stream *s, struct spoe_context *ctx,
                    agent->id, __FUNCTION__, s,
                    ((ctx->flags & SPOE_CTX_FL_FRAGMENTED) ? "last fragment of" : "unfragmented"),
                    ctx->spoe_appctx, (agent->rt[tid].frame_size - FRAME_HDR_SIZE),
-                   p - ctx->buffer->p);
+                   p - b_head(&ctx->buffer));
 
        b_set_data(&ctx->buffer, p - b_head(&ctx->buffer));
        ctx->frag_ctx.curmsg = NULL;
index 56035b9cb2d25b53096c87ef7688da7d735beb8a..6fa38dd232fe9fe6598c067d16a85c2e788fc039 100644 (file)
@@ -1613,13 +1613,13 @@ int http_wait_for_request(struct stream *s, struct channel *req, int an_bit)
        struct http_msg *msg = &txn->req;
        struct hdr_ctx ctx;
 
-       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%d analysers=%02x\n",
+       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%lu analysers=%02x\n",
                now_ms, __FUNCTION__,
                s,
                req,
                req->rex, req->wex,
                req->flags,
-               req->buf.i,
+               ci_data(req),
                req->analysers);
 
        /* we're speaking HTTP here, so let's speak HTTP to the client */
@@ -3477,13 +3477,13 @@ int http_process_req_common(struct stream *s, struct channel *req, int an_bit, s
                goto return_prx_yield;
        }
 
-       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%d analysers=%02x\n",
+       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%lu analysers=%02x\n",
                now_ms, __FUNCTION__,
                s,
                req,
                req->rex, req->wex,
                req->flags,
-               req->buf.i,
+               ci_data(req),
                req->analysers);
 
        /* just in case we have some per-backend tracking */
@@ -3749,13 +3749,13 @@ int http_process_request(struct stream *s, struct channel *req, int an_bit)
                return 0;
        }
 
-       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%d analysers=%02x\n",
+       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%lu analysers=%02x\n",
                now_ms, __FUNCTION__,
                s,
                req,
                req->rex, req->wex,
                req->flags,
-               req->buf.i,
+               ci_data(req),
                req->analysers);
 
        /*
@@ -4909,13 +4909,13 @@ int http_request_forward_body(struct stream *s, struct channel *req, int an_bit)
        struct http_msg *msg = &s->txn->req;
        int ret;
 
-       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%d analysers=%02x\n",
+       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%lu analysers=%02x\n",
                now_ms, __FUNCTION__,
                s,
                req,
                req->rex, req->wex,
                req->flags,
-               req->buf.i,
+               ci_data(req),
                req->analysers);
 
        if (unlikely(msg->msg_state < HTTP_MSG_BODY))
@@ -5145,7 +5145,7 @@ int http_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
        int cur_idx;
        int n;
 
-       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%d analysers=%02x\n",
+       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%lu analysers=%02x\n",
                now_ms, __FUNCTION__,
                s,
                rep,
@@ -5777,7 +5777,7 @@ int http_process_res_common(struct stream *s, struct channel *rep, int an_bit, s
        struct cond_wordlist *wl;
        enum rule_result ret = HTTP_RULE_RES_CONT;
 
-       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%d analysers=%02x\n",
+       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%lu analysers=%02x\n",
                now_ms, __FUNCTION__,
                s,
                rep,
@@ -6126,13 +6126,13 @@ int http_response_forward_body(struct stream *s, struct channel *res, int an_bit
        struct http_msg *msg = &s->txn->rsp;
        int ret;
 
-       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%d analysers=%02x\n",
+       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%lu analysers=%02x\n",
                now_ms, __FUNCTION__,
                s,
                res,
                res->rex, res->wex,
                res->flags,
-               res->buf.i,
+               ci_data(res),
                res->analysers);
 
        if (unlikely(msg->msg_state < HTTP_MSG_BODY))
index 3687bd05307e903e58adb0c659412faf76b981da..d07a92830f5b7060e6c498c0f3f3f0246e3f0026 100644 (file)
@@ -851,13 +851,13 @@ static void sess_update_stream_int(struct stream *s)
        struct stream_interface *si = &s->si[1];
        struct channel *req = &s->req;
 
-       DPRINTF(stderr,"[%u] %s: sess=%p rq=%p, rp=%p, exp(r,w)=%u,%u rqf=%08x rpf=%08x rqh=%d rqt=%d rph=%d rpt=%d cs=%d ss=%d\n",
+       DPRINTF(stderr,"[%u] %s: sess=%p rq=%p, rp=%p, exp(r,w)=%u,%u rqf=%08x rpf=%08x rqh=%lu rqt=%lu rph=%lu rpt=%lu cs=%d ss=%d\n",
                now_ms, __FUNCTION__,
                s,
                req, &s->res,
                req->rex, s->res.wex,
                req->flags, s->res.flags,
-               req->buf->i, req->buf->o, s->res.buf.i, s->res.buf.o, s->si[0].state, s->si[1].state);
+               ci_data(req), co_data(req), ci_data(&s->res), co_data(&s->res), s->si[0].state, s->si[1].state);
 
        if (si->state == SI_ST_ASS) {
                /* Server assigned to connection request, we have to try to connect now */
@@ -1046,13 +1046,13 @@ static void sess_prepare_conn_req(struct stream *s)
 {
        struct stream_interface *si = &s->si[1];
 
-       DPRINTF(stderr,"[%u] %s: sess=%p rq=%p, rp=%p, exp(r,w)=%u,%u rqf=%08x rpf=%08x rqh=%d rqt=%d rph=%d rpt=%d cs=%d ss=%d\n",
+       DPRINTF(stderr,"[%u] %s: sess=%p rq=%p, rp=%p, exp(r,w)=%u,%u rqf=%08x rpf=%08x rqh=%lu rqt=%lu rph=%lu rpt=%lu cs=%d ss=%d\n",
                now_ms, __FUNCTION__,
                s,
                &s->req, &s->res,
                s->req.rex, s->res.wex,
                s->req.flags, s->res.flags,
-               s->req.buf.i, s->req.buf.o, s->res.buf.i, s->res.buf.o, s->si[0].state, s->si[1].state);
+               ci_data(&s->req), co_data(&s->req), ci_data(&s->res), co_data(&s->res), s->si[0].state, s->si[1].state);
 
        if (si->state != SI_ST_REQ)
                return;
@@ -1195,13 +1195,13 @@ static int process_switching_rules(struct stream *s, struct channel *req, int an
        req->analysers &= ~an_bit;
        req->analyse_exp = TICK_ETERNITY;
 
-       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%d analysers=%02x\n",
+       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%lu analysers=%02x\n",
                now_ms, __FUNCTION__,
                s,
                req,
                req->rex, req->wex,
                req->flags,
-               req->buf->i,
+               ci_data(req),
                req->analysers);
 
        /* now check whether we have some switching rules for this request */
@@ -1320,13 +1320,13 @@ static int process_server_rules(struct stream *s, struct channel *req, int an_bi
        struct session *sess = s->sess;
        struct server_rule *rule;
 
-       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bl=%d analysers=%02x\n",
+       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bl=%lu analysers=%02x\n",
                now_ms, __FUNCTION__,
                s,
                req,
                req->rex, req->wex,
                req->flags,
-               req->buf->i + req->buf->o,
+               c_data(req),
                req->analysers);
 
        if (!(s->flags & SF_ASSIGNED)) {
@@ -1370,13 +1370,13 @@ static int process_sticking_rules(struct stream *s, struct channel *req, int an_
        struct session *sess  = s->sess;
        struct sticking_rule  *rule;
 
-       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%d analysers=%02x\n",
+       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%lu analysers=%02x\n",
                now_ms, __FUNCTION__,
                s,
                req,
                req->rex, req->wex,
                req->flags,
-               req->buf->i,
+               ci_data(req),
                req->analysers);
 
        list_for_each_entry(rule, &px->sticking_rules, list) {
@@ -1471,13 +1471,13 @@ static int process_store_rules(struct stream *s, struct channel *rep, int an_bit
        int i;
        int nbreq = s->store_count;
 
-       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%d analysers=%02x\n",
+       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%lu analysers=%02x\n",
                now_ms, __FUNCTION__,
                s,
                rep,
                rep->rex, rep->wex,
                rep->flags,
-               rep->buf->i,
+               ci_data(rep),
                rep->analysers);
 
        list_for_each_entry(rule, &px->storersp_rules, list) {
@@ -1800,14 +1800,14 @@ struct task *process_stream(struct task *t, void *context, unsigned short state)
        /* Check for connection closure */
 
        DPRINTF(stderr,
-               "[%u] %s:%d: task=%p s=%p, sfl=0x%08x, rq=%p, rp=%p, exp(r,w)=%u,%u rqf=%08x rpf=%08x rqh=%d rqt=%d rph=%d rpt=%d cs=%d ss=%d, cet=0x%x set=0x%x retr=%d\n",
+               "[%u] %s:%d: task=%p s=%p, sfl=0x%08x, rq=%p, rp=%p, exp(r,w)=%u,%u rqf=%08x rpf=%08x rqh=%lu rqt=%lu rph=%lu rpt=%lu cs=%d ss=%d, cet=0x%x set=0x%x retr=%d\n",
                now_ms, __FUNCTION__, __LINE__,
                t,
                s, s->flags,
                req, res,
                req->rex, res->wex,
                req->flags, res->flags,
-               req->buf->i, req->buf->o, res->buf->i, res->buf->o, si_f->state, si_b->state,
+               ci_data(req), co_data(req), ci_data(res), co_data(res), si_f->state, si_b->state,
                si_f->err_type, si_b->err_type,
                si_b->conn_retries);
 
index 1b48dedb908d8073ecc7a0428055e3534c82ac77..564b1eaa452ad21ede517c6d8de793c3c1b29fff 100644 (file)
@@ -103,13 +103,13 @@ int tcp_inspect_request(struct stream *s, struct channel *req, int an_bit)
        int partial;
        int act_flags = 0;
 
-       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%d analysers=%02x\n",
+       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%lu analysers=%02x\n",
                now_ms, __FUNCTION__,
                s,
                req,
                req->rex, req->wex,
                req->flags,
-               req->buf->i,
+               ci_data(req),
                req->analysers);
 
        /* We don't know whether we have enough data, so must proceed
@@ -279,13 +279,13 @@ int tcp_inspect_response(struct stream *s, struct channel *rep, int an_bit)
        int partial;
        int act_flags = 0;
 
-       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%d analysers=%02x\n",
+       DPRINTF(stderr,"[%u] %s: stream=%p b=%p, exp(r,w)=%u,%u bf=%08x bh=%lu analysers=%02x\n",
                now_ms, __FUNCTION__,
                s,
                rep,
                rep->rex, rep->wex,
                rep->flags,
-               rep->buf->i,
+               ci_data(rep),
                rep->analysers);
 
        /* We don't know whether we have enough data, so must proceed