forked from enlightenment/enlightenment
fix segv when using udisks to mount during ipc reads
SVN revision: 55989
This commit is contained in:
parent
3e6ccf89ee
commit
c2f5922c89
|
@ -3000,10 +3000,11 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
|||
if ((e->data) && (e->size > 1))
|
||||
{
|
||||
E_Volume *v;
|
||||
char *udi, *mountpoint;
|
||||
char *udi, *mountpoint = NULL;
|
||||
|
||||
udi = e->data;
|
||||
mountpoint = udi + strlen(udi) + 1;
|
||||
if ((unsigned int)e->size != (strlen(udi) + 1))
|
||||
mountpoint = udi + strlen(udi) + 1;
|
||||
v = e_fm2_device_volume_find(udi);
|
||||
if (v)
|
||||
{
|
||||
|
@ -3016,7 +3017,7 @@ e_fm2_client_data(Ecore_Ipc_Event_Client_Data *e)
|
|||
|
||||
a = e_action_find("fileman");
|
||||
m = e_manager_list();
|
||||
if (a && a->func.go && m && eina_list_data_get(m))
|
||||
if (a && a->func.go && m && eina_list_data_get(m) && mountpoint)
|
||||
a->func.go(E_OBJECT(eina_list_data_get(m)), mountpoint);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -421,12 +421,8 @@ e_fm2_device_mount_add(E_Volume *v,
|
|||
E_Fm2_Mount *m;
|
||||
|
||||
v->mounted = EINA_TRUE;
|
||||
if (mountpoint && (*mountpoint != 0))
|
||||
{
|
||||
if (v->mount_point)
|
||||
eina_stringshare_del(v->mount_point);
|
||||
v->mount_point = eina_stringshare_add(mountpoint);
|
||||
}
|
||||
if (mountpoint && (mountpoint[0]))
|
||||
eina_stringshare_replace(&v->mount_point, mountpoint);
|
||||
|
||||
EINA_LIST_FOREACH(v->mounts, l, m)
|
||||
_e_fm2_device_mount_ok(m);
|
||||
|
|
Loading…
Reference in New Issue