vpn: Driver disconnect needs provider information
authorJukka Rissanen <jukka.rissanen@linux.intel.com>
Fri, 30 Nov 2012 09:30:51 +0000 (11:30 +0200)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Fri, 30 Nov 2012 13:01:19 +0000 (15:01 +0200)
The provider pointer needs to be passed to VPN driver when
disconnecting. Otherwise we cannot find the correct provider
that is being disconnected.

vpn/plugins/vpn.c
vpn/plugins/vpn.h

index a8603d9..05068f5 100644 (file)
@@ -458,7 +458,7 @@ static int vpn_disconnect(struct vpn_provider *provider)
 
        vpn_driver_data = g_hash_table_lookup(driver_hash, name);
        if (vpn_driver_data->vpn_driver->disconnect)
-               vpn_driver_data->vpn_driver->disconnect();
+               vpn_driver_data->vpn_driver->disconnect(provider);
 
        if (data->watch != 0) {
                vpn_provider_unref(provider);
index d1e322c..6f86aac 100644 (file)
@@ -46,7 +46,7 @@ struct vpn_driver {
        int (*connect) (struct vpn_provider *provider,
                        struct connman_task *task, const char *if_name,
                        vpn_provider_connect_cb_t cb, void *user_data);
-       void (*disconnect) (void);
+       void (*disconnect) (struct vpn_provider *provider);
        int (*error_code) (int exit_code);
        int (*save) (struct vpn_provider *provider, GKeyFile *keyfile);
 };