Commit a72bf08a authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Eliminate a & which I tend to forget every single time.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2071 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent d98c4217
......@@ -246,7 +246,7 @@ struct object {
double last_modified;
struct http http;
struct http http[1];
VTAILQ_ENTRY(object) list;
VTAILQ_ENTRY(object) deathrow;
......
......@@ -305,9 +305,9 @@ cnt_fetch(struct sess *sp)
sp->bereq = NULL;
if (!i)
RFC2616_cache_policy(sp, &sp->obj->http); /* XXX -> VCL */
RFC2616_cache_policy(sp, sp->obj->http); /* XXX -> VCL */
else
http_PutStatus(sp->wrk, sp->fd, &sp->obj->http, 503);
http_PutStatus(sp->wrk, sp->fd, sp->obj->http, 503);
VCL_fetch_method(sp);
......
......@@ -309,7 +309,7 @@ Fetch(struct sess *sp)
sp->obj->last_modified = TIM_parse(b);
/* Filter into object */
hp2 = &sp->obj->http;
hp2 = sp->obj->http;
len = Tlen(htc->rxbuf);
len += 256; /* XXX: margin for content-length etc */
......
......@@ -87,7 +87,7 @@ HSH_Prealloc(const struct sess *sp)
w->nobj = calloc(sizeof *w->nobj, 1);
XXXAN(w->nobj);
w->nobj->magic = OBJECT_MAGIC;
w->nobj->http.magic = HTTP_MAGIC;
w->nobj->http->magic = HTTP_MAGIC;
w->nobj->busy = 1;
w->nobj->refcnt = 1;
VTAILQ_INIT(&w->nobj->store);
......@@ -304,8 +304,8 @@ HSH_Deref(struct object *o)
if (r != 0)
return;
if (o->http.ws != NULL && o->http.ws->s != NULL)
free(o->http.ws->s);
if (o->http->ws != NULL && o->http->ws->s != NULL)
free(o->http->ws->s);
if (o->vary != NULL)
free(o->vary);
......
......@@ -123,8 +123,8 @@ RES_BuildHttp(struct sess *sp)
http_ClrHeader(sp->http);
sp->http->logtag = HTTP_Tx;
http_CopyResp(sp->http, &sp->obj->http);
http_FilterFields(sp->wrk, sp->fd, sp->http, &sp->obj->http,
http_CopyResp(sp->http, sp->obj->http);
http_FilterFields(sp->wrk, sp->fd, sp->http, sp->obj->http,
HTTPH_A_DELIVER);
TIM_format(TIM_real(), time_str);
......
......@@ -60,14 +60,14 @@ SYN_ErrorPage(struct sess *sp, int status, const char *reason, int ttl)
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC);
CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
CHECK_OBJ_NOTNULL(&sp->obj->http, HTTP_MAGIC);
CHECK_OBJ_NOTNULL(sp->obj->http, HTTP_MAGIC);
assert(sp->obj->busy > 0);
/* shortcuts */
w = sp->wrk;
fd = sp->fd;
o = sp->obj;
h = &o->http;
h = o->http;
now = TIM_real();
/* look up HTTP response */
......
......@@ -76,7 +76,7 @@ VRY_Create(const struct sess *sp)
AN(sbh);
/* No Vary: header, no worries */
if (!http_GetHdr(&sp->obj->http, H_Vary, &v))
if (!http_GetHdr(sp->obj->http, H_Vary, &v))
return;
for (p = v; *p; p++) {
......
......@@ -91,7 +91,7 @@ vrt_selecthttp(const struct sess *sp, enum gethdr_e where)
hp = sp->http;
break;
case HDR_OBJ:
hp = &sp->obj->http;
hp = sp->obj->http;
break;
default:
INCOMPL();
......@@ -215,8 +215,8 @@ VRT_DO_HDR(req, proto, sp->http, HTTP_HDR_PROTO)
VRT_DO_HDR(bereq, request, sp->bereq->http, HTTP_HDR_REQ)
VRT_DO_HDR(bereq, url, sp->bereq->http, HTTP_HDR_URL)
VRT_DO_HDR(bereq, proto, sp->bereq->http, HTTP_HDR_PROTO)
VRT_DO_HDR(obj, proto, &sp->obj->http, HTTP_HDR_PROTO)
VRT_DO_HDR(obj, response, &sp->obj->http, HTTP_HDR_RESPONSE)
VRT_DO_HDR(obj, proto, sp->obj->http, HTTP_HDR_PROTO)
VRT_DO_HDR(obj, response, sp->obj->http, HTTP_HDR_RESPONSE)
VRT_DO_HDR(resp, proto, sp->http, HTTP_HDR_PROTO)
VRT_DO_HDR(resp, response, sp->http, HTTP_HDR_RESPONSE)
......@@ -226,12 +226,12 @@ VRT_l_obj_status(const struct sess *sp, int num)
char *p;
assert(num >= 100 && num <= 999);
p = WS_Alloc(sp->obj->http.ws, 4);
p = WS_Alloc(sp->obj->http->ws, 4);
if (p == NULL)
WSP(sp, SLT_LostHeader, "%s", "obj.status");
else
sprintf(p, "%d", num);
http_SetH(&sp->obj->http, HTTP_HDR_STATUS, p);
http_SetH(sp->obj->http, HTTP_HDR_STATUS, p);
}
int
......@@ -240,9 +240,9 @@ VRT_r_obj_status(const struct sess *sp)
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
/* XXX: use http_GetStatus() */
if (sp->obj->http.status)
return (sp->obj->http.status);
return (atoi(sp->obj->http.hd[HTTP_HDR_STATUS].b));
if (sp->obj->http->status)
return (sp->obj->http->status);
return (atoi(sp->obj->http->hd[HTTP_HDR_STATUS].b));
}
void
......@@ -374,7 +374,7 @@ VRT_r_resp_proto(const struct sess *sp)
{
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
return (sp->obj->http.hd[HTTP_HDR_PROTO].b);
return (sp->obj->http->hd[HTTP_HDR_PROTO].b);
}
const char *
......@@ -382,7 +382,7 @@ VRT_r_resp_response(const struct sess *sp)
{
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
return (sp->obj->http.hd[HTTP_HDR_RESPONSE].b);
return (sp->obj->http->hd[HTTP_HDR_RESPONSE].b);
}
int
......@@ -390,7 +390,7 @@ VRT_r_resp_status(const struct sess *sp)
{
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
return (atoi(sp->obj->http.hd[HTTP_HDR_STATUS].b));
return (atoi(sp->obj->http->hd[HTTP_HDR_STATUS].b));
}
/*--------------------------------------------------------------------*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment