<div dir="ltr">Then I would use vmod_var and store a value in the subroutines and check it once they've returned, that way you won't fuss with the C code.</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>-- <br></div>Guillaume Quintard<br></div></div></div>
<br><div class="gmail_quote">On Wed, Jan 3, 2018 at 5:47 PM, Prem Kumar <span dir="ltr"><<a href="mailto:n.premkumar.me@gmail.com" target="_blank">n.premkumar.me@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div dir="auto">Ok.the scenario is if separate vcl recv/hash/.. subroutines configured for 2 domain URLs,first domain url will be always called and call 2nd domain. The first domain will serve only specific url and return 0 if not. If zero is returned I will use 2nd domain’s recv with header with index 2. Otherwise header to 1. i would like to get return error from respective recv/hash/.. subroutine to main handler which will set header .</div><span class="HOEnZb"><font color="#888888"><div dir="auto"><br></div><div dir="auto">-prem</div></font></span><div><div class="h5"><br><div class="gmail_quote"><div>On Wed, 3 Jan 2018 at 8:12 PM, Guillaume Quintard <<a href="mailto:guillaume@varnish-software.com" target="_blank">guillaume@varnish-software.<wbr>com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi,<div><br></div><div>Pretty sure there was a reason, possibly paving the way to have subroutines return VCL types, some time in the future.</div><div><br></div><div>Can I ask you what's the goal behind this? I feel like you're headed toward an overkill solution, and we can probably avoid that.</div><div><br></div><div>Cheers,</div></div><div class="gmail_extra"><br clear="all"><div><div class="m_7289214283721045077m_-5192932077255844282gmail_signature" data-smartmail="gmail_signature"><div><div>-- <br></div>Guillaume Quintard<br></div></div></div>
<br><div class="gmail_quote"></div></div><div class="gmail_extra"><div class="gmail_quote">On Wed, Jan 3, 2018 at 3:37 PM, Prem Kumar <span><<a href="mailto:n.premkumar.me@gmail.com" target="_blank">n.premkumar.me@gmail.com</a>></span> wrote:<br></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi All,<div><br></div><div>Is there is any reason why subroutines return type changes from "static int" to "void" in varnish.</div><div>During compilation of VCL to C code, all the function return type as void instead of static int before. </div><div><br></div><div>Can you please help if there a way I can return status code from subroutine?.</div><div><br></div><div>lib/libvcc/vcc_parse.c<br></div><div>vcc_ParseFunction(struct vcc *tl)<br></div><div><br></div><div>{</div><div><br></div><div><div> Fh(tl, 0, "void %s(VRT_CTX);\n", sym->rname);</div><div> Fc(tl, 1, "\nvoid __match_proto__(vcl_func_t)\n"<wbr>);</div><div> Fc(tl, 1, "%s(VRT_CTX)\n", sym->rname);</div></div><span class="m_7289214283721045077m_-5192932077255844282HOEnZb"><font color="#888888"><div><br></div><div><br></div><div><br></div><div><br></div><div>-Prem</div></font></span></div>
<br></blockquote></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">______________________________<wbr>_________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org" target="_blank">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" rel="noreferrer" target="_blank">https://www.varnish-cache.org/<wbr>lists/mailman/listinfo/<wbr>varnish-misc</a><br></blockquote></div><br></div>
</blockquote></div></div></div></div>
</blockquote></div><br></div>