fix... gah. formatting mess there.. and the real problem
using str1 == str2 instead of strcmp assuming all strings are stringshared. dont ASSUME this unless you 100% KNOW for sure they are. bad disco stu! SVN revision: 53128
This commit is contained in:
parent
0f9d9dcf30
commit
5f713c865b
|
@ -603,6 +603,7 @@ _e_fm_ipc_cb_server_data(void *data __UNUSED__, int type __UNUSED__, void *event
|
||||||
udi = e->data;
|
udi = e->data;
|
||||||
mountpoint = udi + strlen(udi) + 1;
|
mountpoint = udi + strlen(udi) + 1;
|
||||||
v = e_volume_find(udi);
|
v = e_volume_find(udi);
|
||||||
|
// printf("REQ M %p (find from %s -> %s)\n", v, udi, mountpoint); fflush(stdout);
|
||||||
if (v)
|
if (v)
|
||||||
{
|
{
|
||||||
if (mountpoint[0])
|
if (mountpoint[0])
|
||||||
|
@ -610,7 +611,6 @@ _e_fm_ipc_cb_server_data(void *data __UNUSED__, int type __UNUSED__, void *event
|
||||||
if (v->mount_point) eina_stringshare_del(v->mount_point);
|
if (v->mount_point) eina_stringshare_del(v->mount_point);
|
||||||
v->mount_point = eina_stringshare_add(mountpoint);
|
v->mount_point = eina_stringshare_add(mountpoint);
|
||||||
}
|
}
|
||||||
// printf("REQ M\n");
|
|
||||||
e_volume_mount(v);
|
e_volume_mount(v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -624,7 +624,7 @@ _e_fm_ipc_cb_server_data(void *data __UNUSED__, int type __UNUSED__, void *event
|
||||||
v = e_volume_find(udi);
|
v = e_volume_find(udi);
|
||||||
if (v)
|
if (v)
|
||||||
{
|
{
|
||||||
// printf("REQ UM\n");
|
// printf("REQ UM\n"); fflush(stdout);
|
||||||
e_volume_unmount(v);
|
e_volume_unmount(v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -850,9 +850,11 @@ _e_fm_main_dbus_volume_find(const char *udi)
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
E_Volume *v;
|
E_Volume *v;
|
||||||
|
|
||||||
|
if (!udi) return NULL;
|
||||||
EINA_LIST_FOREACH(_e_vols, l, v)
|
EINA_LIST_FOREACH(_e_vols, l, v)
|
||||||
{
|
{
|
||||||
if (udi == v->udi) return v;
|
if (!v->udi) continue;
|
||||||
|
if (!strcmp(udi, v->udi)) return v;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -364,7 +364,10 @@ e_fm2_dbus_volume_find(const char *udi)
|
||||||
if (!udi) return NULL;
|
if (!udi) return NULL;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(_e_vols, l, v)
|
EINA_LIST_FOREACH(_e_vols, l, v)
|
||||||
if (udi == v->udi) return v;
|
{
|
||||||
|
if (!v->udi) continue;
|
||||||
|
if (!strcmp(udi, v->udi)) return v;
|
||||||
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue