From: des Date: Tue, 4 Mar 2008 11:02:25 +0000 (+0000) Subject: Define obj.hash in the correct place, and regen. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd3a05a4179086a1041852cab04dfeb9ec6d1536;p=varnish Define obj.hash in the correct place, and regen. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2552 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/lib/libvcl/vcc_fixed_token.c b/varnish-cache/lib/libvcl/vcc_fixed_token.c index 86c9fc03..de54d69f 100644 --- a/varnish-cache/lib/libvcl/vcc_fixed_token.c +++ b/varnish-cache/lib/libvcl/vcc_fixed_token.c @@ -541,6 +541,7 @@ vcl_output_lang_h(struct vsb *sb) vsb_cat(sb, "double VRT_r_obj_prefetch(const struct sess *);\n"); vsb_cat(sb, "void VRT_l_obj_prefetch(const struct sess *, double);\n"); vsb_cat(sb, "double VRT_r_obj_lastuse(const struct sess *);\n"); + vsb_cat(sb, "const char *VRT_r_obj_hash(struct sess *sp);\n"); vsb_cat(sb, "const char * VRT_r_resp_proto(const struct sess *);\n"); vsb_cat(sb, "void VRT_l_resp_proto(const struct sess *, const char *, ...);\n"); vsb_cat(sb, "int VRT_r_resp_status(const struct sess *);\n"); diff --git a/varnish-cache/lib/libvcl/vcc_gen_obj.tcl b/varnish-cache/lib/libvcl/vcc_gen_obj.tcl index 3a77f597..0e0c73b8 100755 --- a/varnish-cache/lib/libvcl/vcc_gen_obj.tcl +++ b/varnish-cache/lib/libvcl/vcc_gen_obj.tcl @@ -170,6 +170,10 @@ set spobj { { hit fetch deliver discard timeout} "const struct sess *" } + { obj.hash + RO STRING + { miss hit fetch deliver } + } # The response we send back { resp.proto diff --git a/varnish-cache/lib/libvcl/vcc_obj.c b/varnish-cache/lib/libvcl/vcc_obj.c index 5a008ee6..2ab9c031 100644 --- a/varnish-cache/lib/libvcl/vcc_obj.c +++ b/varnish-cache/lib/libvcl/vcc_obj.c @@ -179,9 +179,9 @@ struct var vcc_vars[] = { 0, VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER | VCL_MET_DISCARD | VCL_MET_TIMEOUT }, - { "obj.hash", HASH, 8, + { "obj.hash", STRING, 8, + "VRT_r_obj_hash(sp)", NULL, - "VRT_l_req_hash(sp, ", V_RO, 0, VCL_MET_MISS | VCL_MET_HIT | VCL_MET_FETCH | VCL_MET_DELIVER