cedric pushed a commit to branch master.
commit dba4a080d9e365740b63b2f476f8430c364aea86
Author: Cedric Bail <[email protected]>
Date: Tue Jun 4 15:03:47 2013 +0900
eet: for more safety let eet handle the reference to the file.
---
src/lib/eet/eet_lib.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lib/eet/eet_lib.c b/src/lib/eet/eet_lib.c
index c1eeb4a..b00324f 100644
--- a/src/lib/eet/eet_lib.c
+++ b/src/lib/eet/eet_lib.c
@@ -1450,7 +1450,7 @@ eet_mmap(Eina_File *file)
INIT_FILE(ef);
ef->ed = NULL;
ef->key = NULL;
- ef->readfp = file;
+ ef->readfp = eina_file_dup(file);
ef->path = eina_stringshare_add(path);
ef->magic = EET_MAGIC_FILE;
ef->references = 1;
@@ -1462,7 +1462,7 @@ eet_mmap(Eina_File *file)
ef->data_size = 0;
ef->sha1 = NULL;
ef->sha1_length = 0;
- ef->readfp_owned = EINA_FALSE;
+ ef->readfp_owned = EINA_TRUE;
ef->data_size = eina_file_size_get(file);
ef->data = eina_file_map_all(file, EINA_FILE_SEQUENTIAL);
--
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j