e/connman: mark dialog as NULL for every case of delete

It was missing delete when user close the windows, so later
it would try to double free dialog.



SVN revision: 76578
This commit is contained in:
Bruno Dilly 2012-09-13 06:24:58 +00:00
parent e89801c6ec
commit a8ef12a337
1 changed files with 4 additions and 14 deletions

View File

@ -77,7 +77,6 @@ _dialog_ok_cb(void *data, E_Dialog *dialog)
{ {
ERR("Couldn't get user input."); ERR("Couldn't get user input.");
e_object_del(E_OBJECT(dialog)); e_object_del(E_OBJECT(dialog));
agent->dialog = NULL;
return; return;
} }
} }
@ -95,9 +94,7 @@ _dialog_ok_cb(void *data, E_Dialog *dialog)
DBUS_DICT_ENTRY_END_CHAR_AS_STRING, &dict); DBUS_DICT_ENTRY_END_CHAR_AS_STRING, &dict);
EINA_LIST_FOREACH(input_list, l, input) EINA_LIST_FOREACH(input_list, l, input)
{
_dict_append_basic(&dict, input->key, input->value); _dict_append_basic(&dict, input->key, input->value);
}
dbus_message_iter_close_container(&iter, &dict); dbus_message_iter_close_container(&iter, &dict);
@ -105,7 +102,6 @@ _dialog_ok_cb(void *data, E_Dialog *dialog)
e_dbus_message_send(agent->conn, reply, NULL, -1, NULL); e_dbus_message_send(agent->conn, reply, NULL, -1, NULL);
e_object_del(E_OBJECT(dialog)); e_object_del(E_OBJECT(dialog));
agent->dialog = NULL;
} }
static void static void
@ -114,7 +110,6 @@ _dialog_cancel_cb(void *data, E_Dialog *dialog)
E_Connman_Agent *agent = data; E_Connman_Agent *agent = data;
agent->canceled = EINA_TRUE; agent->canceled = EINA_TRUE;
e_object_del(E_OBJECT(dialog)); e_object_del(E_OBJECT(dialog));
agent->dialog = NULL;
} }
static void static void
@ -153,6 +148,7 @@ _dialog_del_cb(void *data)
// FIXME need to mark cs->pending_connect = NULL; // FIXME need to mark cs->pending_connect = NULL;
dbus_message_unref(agent->msg); dbus_message_unref(agent->msg);
agent->dialog = NULL;
} }
static void static void
@ -279,10 +275,7 @@ _agent_release(E_DBus_Object *obj, DBusMessage *msg)
EINA_SAFETY_ON_FALSE_RETURN_VAL(agent, reply); EINA_SAFETY_ON_FALSE_RETURN_VAL(agent, reply);
if (agent->dialog) if (agent->dialog)
{
e_object_del(E_OBJECT(agent->dialog)); e_object_del(E_OBJECT(agent->dialog));
agent->dialog = NULL;
}
return reply; return reply;
} }
@ -467,10 +460,7 @@ _agent_cancel(E_DBus_Object *obj, DBusMessage *msg)
EINA_SAFETY_ON_FALSE_RETURN_VAL(agent, reply); EINA_SAFETY_ON_FALSE_RETURN_VAL(agent, reply);
if (agent->dialog) if (agent->dialog)
{
e_object_del(E_OBJECT(agent->dialog)); e_object_del(E_OBJECT(agent->dialog));
agent->dialog = NULL;
}
return reply; return reply;
} }