forked from enlightenment/enlightenment
fix more broken stringshare stuff from ehal memory migration, including incredible lines such as
char *udi = eina_stringshare_del(udi); my bad, I really fudged the bucket on this one guys. SVN revision: 48416
This commit is contained in:
parent
97da075d67
commit
5aa48ed402
|
@ -2005,7 +2005,7 @@ _e_fm2_icon_mime_size_normalize(const E_Fm2_Icon *ic)
|
|||
static Evas_Object *
|
||||
_e_fm2_icon_mime_fdo_get(Evas *evas, const E_Fm2_Icon *ic, const char **type_ret)
|
||||
{
|
||||
const char *icon;
|
||||
char *icon;
|
||||
unsigned int size;
|
||||
|
||||
size = _e_fm2_icon_mime_size_normalize(ic);
|
||||
|
|
|
@ -354,9 +354,9 @@ _e_dbus_cb_dev_all(void *user_data, void *reply_data, DBusError *error)
|
|||
{
|
||||
// printf("DB INIT DEV+: %s\n", udi);
|
||||
e_hal_device_query_capability(_e_dbus_conn, udi, "storage",
|
||||
_e_dbus_cb_store_is, eina_stringshare_add(udi));
|
||||
_e_dbus_cb_store_is, (void*)eina_stringshare_add(udi));
|
||||
e_hal_device_query_capability(_e_dbus_conn, udi, "volume",
|
||||
_e_dbus_cb_vol_is, eina_stringshare_add(udi));
|
||||
_e_dbus_cb_vol_is, (void*)eina_stringshare_add(udi));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -458,9 +458,9 @@ _e_dbus_cb_dev_add(void *data, DBusMessage *msg)
|
|||
dbus_message_get_args(msg, &err, DBUS_TYPE_STRING, &udi, DBUS_TYPE_INVALID);
|
||||
if (!udi) return;
|
||||
e_hal_device_query_capability(_e_dbus_conn, udi, "storage",
|
||||
_e_dbus_cb_store_is, eina_stringshare_add(udi));
|
||||
_e_dbus_cb_store_is, (void*)eina_stringshare_add(udi));
|
||||
e_hal_device_query_capability(_e_dbus_conn, udi, "volume",
|
||||
_e_dbus_cb_vol_is, eina_stringshare_add(udi));
|
||||
_e_dbus_cb_vol_is, (void*)eina_stringshare_add(udi));
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -622,7 +622,7 @@ e_storage_add(const char *udi)
|
|||
if (e_storage_find(udi)) return NULL;
|
||||
s = calloc(1, sizeof(E_Storage));
|
||||
if (!s) return NULL;
|
||||
s->udi = eina_stringshare_del(udi);
|
||||
s->udi = eina_stringshare_add(udi);
|
||||
_e_stores = eina_list_append(_e_stores, s);
|
||||
e_hal_device_get_all_properties(_e_dbus_conn, s->udi,
|
||||
_e_dbus_cb_store_prop, s);
|
||||
|
@ -840,7 +840,7 @@ e_volume_add(const char *udi, char first_time)
|
|||
v = calloc(1, sizeof(E_Volume));
|
||||
if (!v) return NULL;
|
||||
// printf("VOL+ %s\n", udi);
|
||||
v->udi = eina_stringshare_del(udi);
|
||||
v->udi = eina_stringshare_add(udi);
|
||||
v->icon = NULL;
|
||||
v->first_time = first_time;
|
||||
_e_vols = eina_list_append(_e_vols, v);
|
||||
|
|
|
@ -9,10 +9,10 @@ typedef struct _E_Fm2_Mount E_Fm2_Mount;
|
|||
struct _E_Storage
|
||||
{
|
||||
int type;
|
||||
char *udi, *bus;
|
||||
char *drive_type;
|
||||
const char *udi, *bus;
|
||||
const char *drive_type;
|
||||
|
||||
char *model, *vendor, *serial;
|
||||
const char *model, *vendor, *serial;
|
||||
|
||||
char removable, media_available;
|
||||
unsigned long long media_size;
|
||||
|
@ -34,17 +34,17 @@ struct _E_Storage
|
|||
struct _E_Volume
|
||||
{
|
||||
int type;
|
||||
char *udi, *uuid;
|
||||
char *label, *icon, *fstype;
|
||||
const char *udi, *uuid;
|
||||
const char *label, *icon, *fstype;
|
||||
unsigned long long size;
|
||||
|
||||
char partition;
|
||||
int partition_number;
|
||||
char *partition_label;
|
||||
const char *partition_label;
|
||||
char mounted;
|
||||
char *mount_point;
|
||||
const char *mount_point;
|
||||
|
||||
char *parent;
|
||||
const char *parent;
|
||||
E_Storage *storage;
|
||||
void *prop_handler;
|
||||
Eina_List *mounts;
|
||||
|
@ -87,14 +87,14 @@ _e_volume_free(E_Volume *v)
|
|||
v->storage->volumes = eina_list_remove(v->storage->volumes, v);
|
||||
v->storage = NULL;
|
||||
}
|
||||
if (v->udi) free(v->udi);
|
||||
if (v->uuid) free(v->uuid);
|
||||
if (v->label) free(v->label);
|
||||
if (v->icon) free(v->icon);
|
||||
if (v->fstype) free(v->fstype);
|
||||
if (v->partition_label) free(v->partition_label);
|
||||
if (v->mount_point) free(v->mount_point);
|
||||
if (v->parent) free(v->parent);
|
||||
if (v->udi) eina_stringshare_del(v->udi);
|
||||
if (v->uuid) eina_stringshare_del(v->uuid);
|
||||
if (v->label) eina_stringshare_del(v->label);
|
||||
if (v->icon) eina_stringshare_del(v->icon);
|
||||
if (v->fstype) eina_stringshare_del(v->fstype);
|
||||
if (v->partition_label) eina_stringshare_del(v->partition_label);
|
||||
if (v->mount_point) eina_stringshare_del(v->mount_point);
|
||||
if (v->parent) eina_stringshare_del(v->parent);
|
||||
free(v);
|
||||
}
|
||||
|
||||
|
@ -106,14 +106,14 @@ _e_storage_free(E_Storage *s)
|
|||
{
|
||||
_e_volume_free(v);
|
||||
}
|
||||
if (s->udi) free(s->udi);
|
||||
if (s->bus) free(s->bus);
|
||||
if (s->drive_type) free(s->drive_type);
|
||||
if (s->model) free(s->model);
|
||||
if (s->vendor) free(s->vendor);
|
||||
if (s->serial) free(s->serial);
|
||||
if (s->icon.drive) free(s->icon.drive);
|
||||
if (s->icon.volume) free(s->icon.volume);
|
||||
if (s->udi) eina_stringshare_del(s->udi);
|
||||
if (s->bus) eina_stringshare_del(s->bus);
|
||||
if (s->drive_type) eina_stringshare_del(s->drive_type);
|
||||
if (s->model) eina_stringshare_del(s->model);
|
||||
if (s->vendor) eina_stringshare_del(s->vendor);
|
||||
if (s->serial) eina_stringshare_del(s->serial);
|
||||
if (s->icon.drive) eina_stringshare_del(s->icon.drive);
|
||||
if (s->icon.volume) eina_stringshare_del(s->icon.volume);
|
||||
free(s);
|
||||
}
|
||||
|
||||
|
|
|
@ -296,7 +296,7 @@ _e_mod_fileman_parse_gtk_bookmarks(E_Menu *m, Eina_Bool need_separator)
|
|||
ecore_file_file_get(uri->path));
|
||||
e_util_menu_item_theme_icon_set(mi, "folder");
|
||||
e_menu_item_callback_set(mi, _e_mod_menu_gtk_cb,
|
||||
eina_stringshare_del(uri->path));
|
||||
eina_stringshare_add(uri->path));
|
||||
}
|
||||
}
|
||||
if (uri) efreet_uri_free(uri);
|
||||
|
|
Loading…
Reference in New Issue