};
static enum shmlogtag
-T(struct http *hp, enum httptag t)
+http2shmlog(struct http *hp, enum httptag t)
{
CHECK_OBJ_NOTNULL(hp, HTTP_MAGIC);
return (logmtx[hp->logtag][t]);
}
-#define WSLH(wx, ax, bx, cx, dx) \
- WSLR(wx, T((cx), (ax)), (bx), (cx)->hd[(dx)].b, (cx)->hd[(dx)].e);
+static void
+WSLH(struct worker *w, enum httptag t, unsigned xid, struct http *hp, int hdr)
+{
+
+ WSLR(w, http2shmlog(hp, t), xid, hp->hd[hdr].b, hp->hd[hdr].e);
+}
/*--------------------------------------------------------------------*/
hp->nhd++;
} else {
VSL_stats->losthdr++;
- WSLR(w, T(hp, HTTP_T_LostHeader), fd, p, q);
+ WSLR(w, http2shmlog(hp, HTTP_T_LostHeader), fd, p, q);
}
}
assert(hp->t <= hp->v);
CHECK_OBJ_NOTNULL(to, HTTP_MAGIC);
if (to->nhd >= HTTP_HDR_MAX) {
VSL_stats->losthdr++;
- WSL(w, T(to, HTTP_T_LostHeader), fd, "%s", hdr);
+ WSL(w, http2shmlog(to, HTTP_T_LostHeader), fd, "%s", hdr);
return;
}
http_seth(w, fd, to, to->nhd++, HTTP_T_Header, hdr);
n = vsnprintf(to->f, l, fmt, ap);
if (n + 1 > l || to->nhd >= HTTP_HDR_MAX) {
VSL_stats->losthdr++;
- WSL(w, T(to, HTTP_T_LostHeader), fd, "%s", to->f);
+ WSL(w, http2shmlog(to, HTTP_T_LostHeader), fd, "%s", to->f);
} else {
assert(to->f < to->e);
to->hd[to->nhd].b = to->f;