[MINOR] cli: "show errors" should display "backend <NONE>" when backend was not used
It was disturbing to see a backend name associated with a bad request
when this "backend" was in fact the frontend. Instead, we now display
"backend <NONE>" if the "backend" has no backend capability :
> show errors
[25/Mar/2010:06:44:25.394] frontend fe (#1): invalid request
src 127.0.0.1, session #0, backend <NONE> (#-1), server <NONE> (#-1)
request length 45 bytes, error at position 0:
diff --git a/src/dumpstats.c b/src/dumpstats.c
index 71a323c..15174b8 100644
--- a/src/dumpstats.c
+++ b/src/dumpstats.c
@@ -2860,7 +2860,8 @@
" src %s, session #%d, backend %s (#%d), server %s (#%d)\n"
" request length %d bytes, error at position %d:\n \n",
s->data_ctx.errors.px->id, s->data_ctx.errors.px->uuid,
- pn, es->sid, es->oe->id, es->oe->uuid,
+ pn, es->sid, (es->oe->cap & PR_CAP_BE) ? es->oe->id : "<NONE>",
+ (es->oe->cap & PR_CAP_BE) ? es->oe->uuid : -1,
es->srv ? es->srv->id : "<NONE>",
es->srv ? es->srv->puid : -1,
es->len, es->pos);