projects
/
connman
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5c9331b
)
Handle the case when adding a new interface fails
author
Marcel Holtmann
<marcel@holtmann.org>
Thu, 28 May 2009 14:12:00 +0000
(16:12 +0200)
committer
Marcel Holtmann
<marcel@holtmann.org>
Thu, 28 May 2009 14:12:00 +0000
(16:12 +0200)
plugins/supplicant.c
patch
|
blob
|
history
diff --git
a/plugins/supplicant.c
b/plugins/supplicant.c
index
00dfebd
..
45efea8
100644
(file)
--- a/
plugins/supplicant.c
+++ b/
plugins/supplicant.c
@@
-235,7
+235,7
@@
static void add_interface_reply(DBusPendingCall *call, void *user_data)
return;
if (dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR)
return;
if (dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR)
- goto done;
+ goto failed;
dbus_error_init(&error);
dbus_error_init(&error);
@@
-246,7
+246,7
@@
static void add_interface_reply(DBusPendingCall *call, void *user_data)
dbus_error_free(&error);
} else
connman_error("Wrong arguments for add interface");
dbus_error_free(&error);
} else
connman_error("Wrong arguments for add interface");
- goto done;
+ goto failed;
}
DBG("path %s", path);
}
DBG("path %s", path);
@@
-256,8
+256,16
@@
static void add_interface_reply(DBusPendingCall *call, void *user_data)
connman_device_set_powered(task->device, TRUE);
connman_device_set_powered(task->device, TRUE);
-done:
dbus_message_unref(reply);
dbus_message_unref(reply);
+
+ return;
+
+failed:
+ task_list = g_slist_remove(task_list, task);
+
+ connman_device_unref(task->device);
+
+ free_task(task);
}
static int add_interface(struct supplicant_task *task)
}
static int add_interface(struct supplicant_task *task)