diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2011-01-13 00:15:39 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-01-13 00:37:30 +0100 |
commit | 33bed583cf635ca5c95e85470eb97e9b1c630bb4 (patch) | |
tree | 15cea5c00f61f0e941152c06d1d829e4ea3081dd /plugins/pacrunner.c | |
parent | 970e2f1f36c5f91066d5d989d9129553617f33ff (diff) | |
download | connman-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/pacrunner.c')
-rw-r--r-- | plugins/pacrunner.c | 16 |
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) |