forked from enlightenment/efl
fix ethumb client segv's i've been hunting...
This commit is contained in:
parent
33372313a1
commit
d573133ff8
|
@ -205,12 +205,17 @@ _ethumb_client_free(Ethumb_Client *client)
|
||||||
EINA_LIST_FREE(client->pending_add, data)
|
EINA_LIST_FREE(client->pending_add, data)
|
||||||
{
|
{
|
||||||
struct _ethumb_pending_add *pending = data;
|
struct _ethumb_pending_add *pending = data;
|
||||||
pending->client = NULL;
|
|
||||||
if (pending->pending_call)
|
if (pending->pending_call)
|
||||||
|
{
|
||||||
eldbus_pending_cancel(pending->pending_call);
|
eldbus_pending_cancel(pending->pending_call);
|
||||||
|
pending->client = NULL;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
pending->client = NULL;
|
||||||
free(pending);
|
free(pending);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
EINA_LIST_FREE(client->pending_gen, data)
|
EINA_LIST_FREE(client->pending_gen, data)
|
||||||
{
|
{
|
||||||
|
@ -229,12 +234,17 @@ _ethumb_client_free(Ethumb_Client *client)
|
||||||
struct _ethumb_pending_remove *pending = data;
|
struct _ethumb_pending_remove *pending = data;
|
||||||
if (pending->free_data)
|
if (pending->free_data)
|
||||||
pending->free_data(pending->data);
|
pending->free_data(pending->data);
|
||||||
pending->client = NULL;
|
|
||||||
if (pending->pending_call)
|
if (pending->pending_call)
|
||||||
|
{
|
||||||
eldbus_pending_cancel(pending->pending_call);
|
eldbus_pending_cancel(pending->pending_call);
|
||||||
|
pending->client = NULL;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
pending->client = NULL;
|
||||||
free(pending);
|
free(pending);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (client->old_ethumb_conf)
|
if (client->old_ethumb_conf)
|
||||||
{
|
{
|
||||||
|
@ -950,6 +960,7 @@ _ethumb_client_queue_add_cb(void *data, const Eldbus_Message *msg, Eldbus_Pendin
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
generating = calloc(1, sizeof(*generating));
|
generating = calloc(1, sizeof(*generating));
|
||||||
generating->id = id;
|
generating->id = id;
|
||||||
generating->file = pending->file;
|
generating->file = pending->file;
|
||||||
|
@ -1002,10 +1013,11 @@ _ethumb_client_queue_add(Ethumb_Client *client, const char *file, const char *ke
|
||||||
_ethumb_client_dbus_append_bytearray(main_itr, thumb);
|
_ethumb_client_dbus_append_bytearray(main_itr, thumb);
|
||||||
_ethumb_client_dbus_append_bytearray(main_itr, thumb_key);
|
_ethumb_client_dbus_append_bytearray(main_itr, thumb_key);
|
||||||
|
|
||||||
|
client->pending_add = eina_list_append(client->pending_add, pending);
|
||||||
|
|
||||||
pending->pending_call = eldbus_proxy_send(client->proxy, msg,
|
pending->pending_call = eldbus_proxy_send(client->proxy, msg,
|
||||||
_ethumb_client_queue_add_cb,
|
_ethumb_client_queue_add_cb,
|
||||||
pending, -1);
|
pending, -1);
|
||||||
client->pending_add = eina_list_append(client->pending_add, pending);
|
|
||||||
|
|
||||||
return pending->id;
|
return pending->id;
|
||||||
}
|
}
|
||||||
|
@ -1099,6 +1111,7 @@ ethumb_client_generate_cancel(Ethumb_Client *client, int id, Ethumb_Client_Gener
|
||||||
l = l->next;
|
l = l->next;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (pending_add->pending_call)
|
||||||
eldbus_pending_cancel(pending_add->pending_call);
|
eldbus_pending_cancel(pending_add->pending_call);
|
||||||
pending_add->pending_call = NULL;
|
pending_add->pending_call = NULL;
|
||||||
found = 1;
|
found = 1;
|
||||||
|
|
Loading…
Reference in New Issue