forked from enlightenment/efl
account for canceled operations (no events for these), remove freed disks from event list
SVN revision: 59446
This commit is contained in:
parent
d35ef797bc
commit
c4b01dc22f
|
@ -190,6 +190,7 @@ error:
|
|||
EAPI void
|
||||
eeze_disk_free(Eeze_Disk *disk)
|
||||
{
|
||||
extern Eina_List *eeze_events;
|
||||
EINA_SAFETY_ON_NULL_RETURN(disk);
|
||||
|
||||
udev_device_unref(disk->device);
|
||||
|
@ -201,6 +202,7 @@ eeze_disk_free(Eeze_Disk *disk)
|
|||
eina_strbuf_free(disk->eject_cmd);
|
||||
if (disk->mounter) ecore_exe_kill(disk->mounter);
|
||||
_eeze_disks = eina_list_remove(_eeze_disks, disk);
|
||||
eeze_events = eina_list_remove(eeze_events, disk);
|
||||
free(disk);
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ EAPI int EEZE_EVENT_DISK_UNMOUNT = 0;
|
|||
EAPI int EEZE_EVENT_DISK_EJECT = 0;
|
||||
EAPI int EEZE_EVENT_DISK_ERROR = 0;
|
||||
static Ecore_Event_Handler *_mount_handler = NULL;
|
||||
static Eina_List *eeze_events = NULL;
|
||||
Eina_List *eeze_events = NULL;
|
||||
|
||||
/*
|
||||
*
|
||||
|
@ -67,6 +67,11 @@ _eeze_disk_mount_result_handler(void *data __UNUSED__, int type __UNUSED__, Ecor
|
|||
return ECORE_CALLBACK_RENEW;
|
||||
|
||||
eeze_events = eina_list_remove_list(eeze_events, l);
|
||||
if (!disk->mounter) /* killed */
|
||||
{
|
||||
disk->mount_status = EEZE_DISK_NULL;
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
if (disk->mount_status == EEZE_DISK_MOUNTING)
|
||||
{
|
||||
disk->mounter = NULL;
|
||||
|
|
Loading…
Reference in New Issue