[master] f24d649 Add back SLT_BackendOpen and give it both endpoints.
Poul-Henning Kamp
phk at FreeBSD.org
Wed Feb 25 11:56:43 CET 2015
commit f24d649b00b61199f452c845142392d14d2d5c52
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Feb 25 10:56:22 2015 +0000
Add back SLT_BackendOpen and give it both endpoints.
diff --git a/bin/varnishd/cache/cache_backend.c b/bin/varnishd/cache/cache_backend.c
index 3e1b1bf..c2cf666 100644
--- a/bin/varnishd/cache/cache_backend.c
+++ b/bin/varnishd/cache/cache_backend.c
@@ -42,6 +42,7 @@
#include "cache_backend.h"
#include "cache_director.h"
#include "vrt.h"
+#include "vtcp.h"
#define FIND_TMO(tmx, dst, bo, be) \
do { \
@@ -85,6 +86,8 @@ vbe_dir_getfd(const struct director *d, struct busyobj *bo)
struct backend *bp;
double tmod;
const struct vrt_backend *vrt;
+ char abuf1[VTCP_ADDRBUFSIZE], abuf2[VTCP_ADDRBUFSIZE];
+ char pbuf1[VTCP_PORTBUFSIZE], pbuf2[VTCP_PORTBUFSIZE];
CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
@@ -123,6 +126,11 @@ vbe_dir_getfd(const struct director *d, struct busyobj *bo)
bp->vsc->conn++;
Lck_Unlock(&bp->mtx);
+ VTCP_myname(vc->fd, abuf1, sizeof abuf1, pbuf1, sizeof pbuf1);
+ VTCP_hisname(vc->fd, abuf2, sizeof abuf2, pbuf2, sizeof pbuf2);
+ VSLb(bo->vsl, SLT_BackendOpen, "%d %s %s %s %s %s",
+ vc->fd, bp->display_name, abuf2, pbuf2, abuf1, pbuf1);
+
vc->backend->vsc->req++;
if (bo->htc == NULL)
bo->htc = WS_Alloc(bo->ws, sizeof *bo->htc);
diff --git a/include/tbl/vsl_tags.h b/include/tbl/vsl_tags.h
index 7dd918d..d8fc721 100644
--- a/include/tbl/vsl_tags.h
+++ b/include/tbl/vsl_tags.h
@@ -101,12 +101,14 @@ SLTM(SessClose, 0, "Client connection closed",
SLTM(BackendOpen, 0, "Backend connection opened",
"Logged when a new backend connection is opened.\n\n"
"The format is::\n\n"
- "\t%d %s %s %s\n"
- "\t| | | |\n"
- "\t| | | +- Remote port\n"
- "\t| | +---- Remote address\n"
- "\t| +------- Backend display name\n"
- "\t+---------- Connection file descriptor\n"
+ "\t%d %s %s %s %s %s\n"
+ "\t| | | | | |\n"
+ "\t| | | | | +- Local port\n"
+ "\t| | | | +---- Local address\n"
+ "\t| | | +------- Remote port\n"
+ "\t| | +---------- Remote address\n"
+ "\t| +------------- Backend display name\n"
+ "\t+---------------- Connection file descriptor\n"
"\n"
)
More information about the varnish-commit
mailing list