Skip to content

Instantly share code, notes, and snippets.

@tfheen
Created August 6, 2013 08:53
Show Gist options
  • Select an option

  • Save tfheen/6162842 to your computer and use it in GitHub Desktop.

Select an option

Save tfheen/6162842 to your computer and use it in GitHub Desktop.
diff --git a/bin/varnishd/cache_dir.c b/bin/varnishd/cache_dir.c
index 2463aa8..73cae9b 100644
--- a/bin/varnishd/cache_dir.c
+++ b/bin/varnishd/cache_dir.c
@@ -94,12 +94,14 @@ VDI_RecycleFd(struct sess *sp)
struct vbc *
VDI_GetFd(const struct director *d, struct sess *sp)
{
-
+ struct vbc *vbc;
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
if (d == NULL)
d = sp->director;
CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
- return (d->getfd(d, sp));
+ vbc = d->getfd(d, sp);
+ WSL(sp->wrk, SLT_BackendXID, vbc->fd, "%d", sp->xid);
+ return (vbc);
}
/* Check health ------------------------------------------------------
diff --git a/lib/libvarnishapi/vsl.c b/lib/libvarnishapi/vsl.c
index 8ffff30..8ae2856 100644
--- a/lib/libvarnishapi/vsl.c
+++ b/lib/libvarnishapi/vsl.c
@@ -252,9 +252,9 @@ VSL_NextLog(const struct VSM_data *vd, uint32_t **pp, uint64_t *bits)
}
if (vbit_test(vsl->vbm_supress, t))
continue;
- if (vsl->b_opt && !vbit_test(vsl->vbm_backend, u))
+ if (vsl->b_opt && !vbit_test(vsl->vbm_backend, u) && !vsl->c_opt)
continue;
- if (vsl->c_opt && !vbit_test(vsl->vbm_client, u))
+ if (vsl->c_opt && !vbit_test(vsl->vbm_client, u) && !vsl->b_opt)
continue;
if (vsl->regincl != NULL) {
i = VRE_exec(vsl->regincl, VSL_DATA(p), VSL_LEN(p),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment