diff options
author | David Woodhouse <dwmw2@infradead.org> | 2016-06-20 14:25:06 +0100 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2016-06-23 10:11:53 +0300 |
commit | 3fd8f63041a5e26ec90c67317f0f30f7d74598d0 (patch) | |
tree | 77f59ea71a85628c7d35ca07d9cb75ba71b3f460 | |
parent | fb65047202369fa5544ddbff2d3ba1af89c67e20 (diff) | |
download | pacrunner-3fd8f63041a5e26ec90c67317f0f30f7d74598d0.tar.gz |
proxy: Add get/set methods for new jsctx pointer
If we want the JS backends to be able to store context per proxy config,
then we need to give them somewhere to put it...
-rw-r--r-- | src/pacrunner.h | 3 | ||||
-rw-r--r-- | src/proxy.c | 11 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/pacrunner.h b/src/pacrunner.h index 71913bb..7b7ad15 100644 --- a/src/pacrunner.h +++ b/src/pacrunner.h @@ -76,6 +76,9 @@ int pacrunner_proxy_disable(struct pacrunner_proxy *proxy); char *pacrunner_proxy_lookup(const char *url, const char *host); +void __pacrunner_proxy_set_jsctx(struct pacrunner_proxy *proxy, void *jsctx); +void *__pacrunner_proxy_get_jsctx(struct pacrunner_proxy *proxy); + int __pacrunner_proxy_init(void); void __pacrunner_proxy_cleanup(void); diff --git a/src/proxy.c b/src/proxy.c index e913a3a..47be08a 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -41,6 +41,7 @@ struct pacrunner_proxy { GList **servers; GList **excludes; GList *domains; + void *jsctx; }; struct proxy_domain { @@ -584,6 +585,16 @@ static gboolean proxy_config_timeout(gpointer user_data) return FALSE; } +void __pacrunner_proxy_set_jsctx(struct pacrunner_proxy *proxy, void *jsctx) +{ + proxy->jsctx = jsctx; +} + +void *__pacrunner_proxy_get_jsctx(struct pacrunner_proxy *proxy) +{ + return proxy->jsctx; +} + int __pacrunner_proxy_init(void) { DBG(""); |