SUPPLICANT_DBG("");
- if (error != NULL)
+ if (error != NULL) {
result = -EIO;
+ if (g_strcmp0("org.freedesktop.DBus.Error.UnknownMethod",
+ error) == 0)
+ result = -ECONNABORTED;
+ }
if (data->callback != NULL)
data->callback(result, data->interface, data->user_data);
DBusMessageIter *iter, void *user_data)
{
struct interface_data *data = user_data;
+ int result = 0;
SUPPLICANT_DBG("");
- if (error != NULL && data->callback != NULL)
- data->callback(-EIO, data->interface, data->user_data);
+ if (error != NULL) {
+ result = -EIO;
+ if (g_strcmp0("org.freedesktop.DBus.Error.UnknownMethod",
+ error) == 0)
+ result = -ECONNABORTED;
+ }
+
+ if (result < 0 && data->callback != NULL) {
+ data->callback(result, data->interface, data->user_data);
+ data->callback = NULL;
+ }
/* If we are disconnecting from previous WPS successful
* association. i.e.: it did not went through AddNetwork,
return;
}
- network_remove(data);
+ if (result != -ECONNABORTED)
+ network_remove(data);
+ else
+ dbus_free(data);
}
int g_supplicant_interface_disconnect(GSupplicantInterface *interface,