On 10/16/2016 10:30 PM, Frederik Ramm wrote:
> I should be able to do this:
> if (bereq.backend == "somedirector")
> vgc.c:2152:35: error: comparison with string literal results in
> unspecified behavior [-Werror=address]
Ok, I meanwhile found out two things:
1. bereq.backend will contain the actual backend selected by the
director, not the director itself;
2. for some reason I cannot do a string equality check against
bereq.backend like above, but I can do
if (std.strstr(bereq.backend, "somebackend"))
- which doesn't make me entirely happy since a strstr is certainly more
expensive than a string equality check but at least that seems to work!
Frederik Ramm ## eMail frede...@remote.org ## N49°00'09" E008°23'33"
varnish-misc mailing list