MINOR: protocol: uniformize protocol errors
Some protocols fail with "error blah [ip:port]" and other fail with
"[ip:port] error blah". All this already appears in a "starting" or
"binding" context after a proxy name. Let's choose a more universal
approach like below where the ip:port remains at the end of the line
prefixed with "for".
[WARNING] (18632) : Binding [binderr.cfg:10] for proxy http: cannot bind receiver to device 'eth2' (No such device) for [0.0.0.0:1080]
[WARNING] (18632) : Starting [binderr.cfg:10] for proxy http: cannot set MSS to 12 for [0.0.0.0:1080]
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index 9546653..18e9b80 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -734,7 +734,7 @@
char pn[INET6_ADDRSTRLEN];
addr_to_str(&listener->rx.addr, pn, sizeof(pn));
- snprintf(errmsg, errlen, "[%s:%d]: %s", pn, get_host_port(&listener->rx.addr), msg->area);
+ snprintf(errmsg, errlen, "%s for [%s:%d]", msg->area, pn, get_host_port(&listener->rx.addr));
}
free_trash_chunk(msg);
msg = NULL;