Hi Darshit,
the ./configure script still says 'PSL: Yes' even if i do not have libpsl
installed. I already sent you a working code snippet, please don't forget to
add it to configure.ac.
> return true ? (is_acceptable == 1) : false;
Interesting construct ;-)
Why not simply
return is_acceptable == 1;
or
return !!is_acceptable;
(First one is preferred due to readability).
Tim
On Monday 07 July 2014 17:08:48 Darshit Shah wrote:
> The version on origin/master is the latest version. The slight
> amendment I made was using this snippet:
>
> @@ -519,7 +531,21 @@ check_domain_match (const char *cookie_domain,
> const char *host)
> goto no_psl;
> }
>
> - is_acceptable = psl_is_cookie_domain_acceptable (psl, host,
> cookie_domain); + if (psl_str_to_utf8lower (cookie_domain, NULL, NULL,
> &cookie_domain_lower) == PSL_SUCCESS &&
> + psl_str_to_utf8lower (host, NULL, NULL, &host_lower) == PSL_SUCCESS)
> + {
> + is_acceptable = psl_is_cookie_domain_acceptable (psl,
> host_lower, cookie_domain_lower);
> + }
> + else
> + {
> + DEBUGP (("libpsl unable to parse domain name. "
> + "Falling back to simple heuristics.\n"));
> + goto no_psl;
> + }
> +
> + xfree (cookie_domain_lower);
> + xfree (host_lower);
> +
> return true ? (is_acceptable == 1) : false;
>
> no_psl:
>
>
> Notice I changed the conditional statement to check for PSL_SUCCESS as
> a return value.
>
> On Mon, Jul 7, 2014 at 4:43 PM, Tim Ruehsen <[email protected]> wrote:
> > On Saturday 05 July 2014 16:38:54 Darshit Shah wrote:
> >> I just pushed a slightly amended patch. However, here is what I propose:
> > Where did you push it to ?
> > Git pull on master still has the previous version...
> >
> > Tim