Send connman mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."


Today's Topics:

   1. [PATCH 6/6] proxy: add debugging on proxy selection
      (David Woodhouse)
   2. Re: [PATCH 5/6] mozjs: fix global variable storage
      (David Woodhouse)


----------------------------------------------------------------------

Message: 1
Date: Mon, 20 Jun 2016 14:26:25 +0100
From: David Woodhouse <[email protected]>
To: [email protected]
Subject: [PATCH 6/6] proxy: add debugging on proxy selection
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"

---
 src/proxy.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/proxy.c b/src/proxy.c
index 08ae3dd..db49c58 100644
--- a/src/proxy.c
+++ b/src/proxy.c
@@ -181,6 +181,8 @@ int pacrunner_proxy_set_domains(struct pacrunner_proxy 
*proxy, char **domains)
 
                data = g_malloc0(sizeof(struct proxy_domain));
 
+               DBG("proxy %p domain %s", proxy, *domain);
+
                slash = strchr(*domain, '/');
                if (!slash) {
                        data->domain = g_strdup(*domain);
@@ -530,6 +532,8 @@ char *pacrunner_proxy_lookup(const char *url, const char 
*host)
                                if (compare_legacy_ip_in_net(&ip4_addr,
                                                                data) == 0) {
                                        selected_proxy = proxy;
+                                       DBG("match proxy %p Legacy IP range %s",
+                                           proxy, data->domain);
                                        goto found;
                                }
                                break;
@@ -537,12 +541,16 @@ char *pacrunner_proxy_lookup(const char *url, const char 
*host)
                                if (compare_ipv6_in_net(&ip6_addr,
                                                        data) == 0) {
                                        selected_proxy = proxy;
+                                       DBG("match proxy %p IPv6 range %s",
+                                           proxy, data->domain);
                                        goto found;
                                }
                                break;
                        default:
                                if (compare_host_in_domain(host, data) == 0) {
                                        selected_proxy = proxy;
+                                       DBG("match proxy %p DNS domain %s",
+                                           proxy, data->domain);
                                        goto found;
                                }
                                break;
@@ -550,8 +558,10 @@ char *pacrunner_proxy_lookup(const char *url, const char 
*host)
                }
        }
 
-       if (!selected_proxy)
+       if (!selected_proxy) {
+               DBG("default proxy %p", default_proxy);
                selected_proxy = default_proxy;
+       }
 
 found:
        pthread_mutex_unlock(&proxy_mutex);
-- 
2.7.4

-- 
David Woodhouse                            Open Source Technology Centre
[email protected]                              Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5760 bytes
Desc: not available
URL: 
<http://lists.01.org/pipermail/connman/attachments/20160620/814e0e3c/attachment-0001.bin>

------------------------------

Message: 2
Date: Mon, 20 Jun 2016 14:46:25 +0100
From: David Woodhouse <[email protected]>
To: [email protected]
Subject: Re: [PATCH 5/6] mozjs: fix global variable storage
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"

On Mon, 2016-06-20 at 14:26 +0100, David Woodhouse wrote:
> Support a JS context per proxy configuration, instead of only one at a
> time.

FWIW I took a quick look at doing this for the v8 back end, and I'm not
convinced I understand it well enough. It seems to be full of
bizarreness like objects declared on the stack that appear to be unused
but in fact have strange effects based on their mere *existence*, like
? v8::Locker lck;
which takes the lock in its constructor, and releases it in its
destructor when it goes out of scope.

I would normally consult with the person who wrote the code, who might
be expected to know a little bit more about it... but unfortunately on
this occasion that person seems to be me.

It *does* work as-is, with the current single-context model and just
changing context each time it needs to do a lookup in a different
configuration. So I'm inclined to leave it as it is.

Or maybe just *delete* the v8 back end completely. We added it for
MeeGo because we were based on v8/Chromium there, but I think those
days are long gone. We ought to be moving to duktape anyway.

-- 
David Woodhouse                            Open Source Technology Centre
[email protected]                              Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5760 bytes
Desc: not available
URL: 
<http://lists.01.org/pipermail/connman/attachments/20160620/3f4a2fc1/attachment-0001.bin>

------------------------------

Subject: Digest Footer

_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman


------------------------------

End of connman Digest, Vol 8, Issue 29
**************************************

Reply via email to