]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: debug: Use DPRINTF instead of fprintf into #ifdef DEBUG_FULL/#endif
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 24 Nov 2017 15:06:18 +0000 (16:06 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 24 Nov 2017 16:19:03 +0000 (17:19 +0100)
src/backend.c
src/stream.c

index c8c2b9dea89b855b88b4ccc6d47414ec95741449..4231c34705404db01b50a8cd7d254303199bbe9b 100644 (file)
@@ -770,9 +770,7 @@ int assign_server_address(struct stream *s)
        struct connection *cli_conn = objt_conn(strm_orig(s));
        struct connection *srv_conn = cs_conn(objt_cs(s->si[1].end));
 
-#ifdef DEBUG_FULL
-       fprintf(stderr,"assign_server_address : s=%p\n",s);
-#endif
+       DPRINTF(stderr,"assign_server_address : s=%p\n",s);
 
        if ((s->flags & SF_DIRECT) || (s->be->lbprm.algo & BE_LB_KIND)) {
                /* A server is necessarily known for this stream */
index 63d22011229f18500fc073e2ee15a03a2b11eb0c..1dcd1e7d915fefe4ef40bed842ae39787058bf07 100644 (file)
@@ -2441,13 +2441,11 @@ struct task *process_stream(struct task *t)
                if (si_b->exp)
                        t->expire = tick_first(t->expire, si_b->exp);
 
-#ifdef DEBUG_FULL
-               fprintf(stderr,
+               DPRINTF(stderr,
                        "[%u] queuing with exp=%u req->rex=%u req->wex=%u req->ana_exp=%u"
                        " rep->rex=%u rep->wex=%u, si[0].exp=%u, si[1].exp=%u, cs=%d, ss=%d\n",
                        now_ms, t->expire, req->rex, req->wex, req->analyse_exp,
                        res->rex, res->wex, si_f->exp, si_b->exp, si_f->state, si_b->state);
-#endif
 
 #ifdef DEBUG_DEV
                /* this may only happen when no timeout is set or in case of an FSM bug */