summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2011-01-13 00:15:39 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2011-01-13 00:37:30 +0100
commit33bed583cf635ca5c95e85470eb97e9b1c630bb4 (patch)
tree15cea5c00f61f0e941152c06d1d829e4ea3081dd /plugins
parent970e2f1f36c5f91066d5d989d9129553617f33ff (diff)
downloadconnman-33bed583cf635ca5c95e85470eb97e9b1c630bb4.tar.gz
connman-33bed583cf635ca5c95e85470eb97e9b1c630bb4.tar.bz2
connman-33bed583cf635ca5c95e85470eb97e9b1c630bb4.zip
pacrunner: Implement proxy_changed hook
When the default service proxy changes, a new configuration is pushed to PACRunner.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/pacrunner.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/plugins/pacrunner.c b/plugins/pacrunner.c
index d44c3cb7..2d0a4195 100644
--- a/plugins/pacrunner.c
+++ b/plugins/pacrunner.c
@@ -255,9 +255,25 @@ static void default_service_changed(struct connman_service *service)
create_proxy_configuration();
}
+static void proxy_changed(struct connman_service *service)
+{
+ DBG("service %p", service);
+
+ if (service != default_service)
+ return;
+
+ if (daemon_running == FALSE)
+ return;
+
+ destroy_proxy_configuration();
+
+ create_proxy_configuration();
+}
+
static struct connman_notifier pacrunner_notifier = {
.name = "pacrunner",
.default_changed = default_service_changed,
+ .proxy_changed = proxy_changed,
};
static void pacrunner_connect(DBusConnection *conn, void *user_data)