]> err.no Git - varnish/commitdiff
Implement VRT_r_obj_status(), without which obj.status can't be read.
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 24 Jul 2007 11:39:55 +0000 (11:39 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 24 Jul 2007 11:39:55 +0000 (11:39 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1745 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_vrt.c

index dbc6314b8e780b690fa98ac059155eaf92f40abe..2518a4c4c17096001c0d3332c48df5bdb9c6cff3 100644 (file)
@@ -234,6 +234,14 @@ VRT_l_obj_status(struct sess *sp, int num)
        http_SetH(&sp->obj->http, HTTP_HDR_STATUS, p);
 }
 
+int
+VRT_r_obj_status(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));
+}
+
 void
 VRT_l_resp_status(struct sess *sp, int num)
 {