[experimental-ims] a1d9126 Move another 8 bytes from sess to req
Geoff Simmons
geoff at varnish-cache.org
Tue Jan 10 00:03:31 CET 2012
commit a1d91261e761afa4f534911cb98a93d1473d78b2
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Fri Dec 23 12:55:42 2011 +0000
Move another 8 bytes from sess to req
diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index bf4754b..7517d1c 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -617,6 +617,7 @@ struct req {
double t_resp;
struct http_conn htc[1];
+ char *client_identity;
};
@@ -646,7 +647,6 @@ struct sess {
/* formatted ascii client address */
char addr[ADDR_BUFSIZE];
char port[PORT_BUFSIZE];
- char *client_identity;
VTAILQ_ENTRY(sess) poollist;
struct acct acct_ses;
diff --git a/bin/varnishd/cache/cache_center.c b/bin/varnishd/cache/cache_center.c
index b6d7a67..5816119 100644
--- a/bin/varnishd/cache/cache_center.c
+++ b/bin/varnishd/cache/cache_center.c
@@ -1498,7 +1498,7 @@ cnt_recv(struct sess *sp)
sp->req->disable_esi = 0;
sp->req->hash_always_miss = 0;
sp->req->hash_ignore_busy = 0;
- sp->client_identity = NULL;
+ sp->req->client_identity = NULL;
http_CollectHdr(sp->http, H_Cache_Control);
diff --git a/bin/varnishd/cache/cache_dir_random.c b/bin/varnishd/cache/cache_dir_random.c
index 28a079c..b323343 100644
--- a/bin/varnishd/cache/cache_dir_random.c
+++ b/bin/varnishd/cache/cache_dir_random.c
@@ -105,8 +105,8 @@ vdi_random_init_seed(const struct vdi_random *vs, const struct sess *sp)
switch (vs->criteria) {
case c_client:
- if (sp->client_identity != NULL)
- p = sp->client_identity;
+ if (sp->req->client_identity != NULL)
+ p = sp->req->client_identity;
else
p = sp->addr;
retval = vdi_random_sha(p, strlen(p));
diff --git a/bin/varnishd/cache/cache_vrt_var.c b/bin/varnishd/cache/cache_vrt_var.c
index aef935b..7ac9768 100644
--- a/bin/varnishd/cache/cache_vrt_var.c
+++ b/bin/varnishd/cache/cache_vrt_var.c
@@ -209,8 +209,8 @@ const char * __match_proto__()
VRT_r_client_identity(struct sess *sp)
{
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
- if (sp->client_identity != NULL)
- return (sp->client_identity);
+ if (sp->req->client_identity != NULL)
+ return (sp->req->client_identity);
else
return (sp->addr);
}
@@ -224,7 +224,7 @@ VRT_l_client_identity(struct sess *sp, const char *str, ...)
va_start(ap, str);
b = VRT_String(sp->http->ws, NULL, str, ap);
va_end(ap);
- sp->client_identity = b;
+ sp->req->client_identity = b;
}
/*--------------------------------------------------------------------*/
More information about the varnish-commit
mailing list