projects
/
platform
/
upstream
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de460f0
)
vpn: Make sure vpn connection really exists before removing it
author
Jukka Rissanen
<jukka.rissanen@linux.intel.com>
Thu, 7 Mar 2013 16:13:45 +0000
(18:13 +0200)
committer
Patrik Flykt
<patrik.flykt@linux.intel.com>
Fri, 8 Mar 2013 11:50:18 +0000
(13:50 +0200)
plugins/vpn.c
patch
|
blob
|
history
diff --git
a/plugins/vpn.c
b/plugins/vpn.c
index
04318a9
..
038a833
100644
(file)
--- a/
plugins/vpn.c
+++ b/
plugins/vpn.c
@@
-1508,6
+1508,7
@@
static gboolean connection_removed(DBusConnection *conn, DBusMessage *message,
{
const char *path;
const char *signature = DBUS_TYPE_OBJECT_PATH_AS_STRING;
+ struct connection_data *data;
if (dbus_message_has_signature(message, signature) == FALSE) {
connman_error("vpn removed signature \"%s\" does not match "
@@
-1518,7
+1519,11
@@
static gboolean connection_removed(DBusConnection *conn, DBusMessage *message,
dbus_message_get_args(message, NULL, DBUS_TYPE_OBJECT_PATH, &path,
DBUS_TYPE_INVALID);
- remove_connection(conn, path);
+
+ data = g_hash_table_lookup(vpn_connections, get_ident(path));
+ if (data != NULL)
+ remove_connection(conn, path);
+
return TRUE;
}