Commit Graph

178 Commits

Author SHA1 Message Date
Lucas De Marchi 2a84379ba9 Remove unneeded code with notnull.cocci script
The notnull.cocci script from Coccinelle finds places where you check if a
variable is NULL, but it's known not to be NULL. The check can be safely
removed. For example, this code would be caught by notnull:

if (!var) return;
if (var && var->fld) { ... }

It's needless to check again if var is not NULL because if it's in fact NULL,
it would have returned on the previous "if". This commit removes all the
trivial places where this pattern happens. Another patch will be generated for
the more complex cases.


SVN revision: 50241
2010-07-14 02:05:47 +00:00
Cedric BAIL 6df28268ca * eet: add support for eet_alias.
SVN revision: 49939
2010-06-29 16:20:23 +00:00
Carsten Haitzler 7d039b1101 extra ; - remove
SVN revision: 49269
2010-05-29 06:19:40 +00:00
Carsten Haitzler 56265a930f eet now has an eet_version you can runtime check:
eet_version->major
eet_version->minor
eet_version->micro
eet_version->revision

also an ifdef.

nb - revision is 0 if its a rrelease, > 0 if built from svn.



SVN revision: 49098
2010-05-21 14:07:25 +00:00
Iván Briano bb157d6145 Delete the right file, not the newly added to the cache.
SVN revision: 48262
2010-04-23 23:01:29 +00:00
Cedric BAIL b02d6ed0ce * eet: Add eet_sync, reduce between file delete and file creation,
reduce number of fd open.

	This should not break anything, but report any issue regarding eet file
	creation, thread and file corruption on disk.


SVN revision: 47872
2010-04-09 13:45:25 +00:00
Cedric BAIL 97b8f7a58d * eet: remove dead code.
SVN revision: 47871
2010-04-09 12:38:49 +00:00
Cedric BAIL 28759c1a67 * eet: fix file corruption reported by Tiago Falcao <tiago@profusion.mobi>
Note: Do never call eet_flush2 if you don't actually fclose the file just after.



SVN revision: 47832
2010-04-08 14:04:22 +00:00
Vincent Torri 84bf1cda79 must include winsock2.h before time.h and jpeglib.h (for vc++...)
SVN revision: 47721
2010-04-03 06:11:19 +00:00
Vincent Torri a8cc200870 * update Visual Studio project files
* declare alloca in eet_connection.c
 * remove the definition of __UNUSED__ (already done in config.h)
 * reorganize a bit the inclusion of header files so that
   the code is a bit more consistent


SVN revision: 47719
2010-04-03 05:29:44 +00:00
Cedric BAIL 92cf666bd7 * eet: Fix a dead lock when reopening the same file.
SVN revision: 47286
2010-03-16 12:10:28 +00:00
Cedric BAIL 649760234c * eet: Reintroduce eet cache lock fix.
This version also fix a bug when file wasn't an eet file.


SVN revision: 47237
2010-03-15 14:47:51 +00:00
Carsten Haitzler 73a9612f2c also revert - on3e of these 2 - or both, causes a deadlock in e. see my
previous commit log.



SVN revision: 46918
2010-03-07 03:01:55 +00:00
Carsten Haitzler 329628e8e7 remove this patch (and will remove next too).. somethgn created a deadlock..
for NON threaded apps (e17). specifically:

   if (!locked) LOCK_CACHE;
   
at the top of eet_internal_close() gets called (locked is 0) and deadlocks e.
this is worse than threaded apps having problems. so... need to revert.



SVN revision: 46917
2010-03-07 03:01:14 +00:00
Cedric BAIL 9033f05263 * eet: Fix a dead lock when eet file was open more than once.
SVN revision: 46892
2010-03-05 17:29:37 +00:00
Cedric BAIL c285985eeb * eet: Fix clearcache race condition.
Patch by Adam Simpkins.


SVN revision: 46891
2010-03-05 17:19:03 +00:00
Carsten Haitzler 0226ebda94 fmatting.
SVN revision: 46758
2010-03-02 01:07:32 +00:00
Cedric BAIL 3e59d34441 * eet: Fix override of global symbols.
Patch from Albin "Lutin" Tonnerre <albin.tonnerre@gmail.com>


SVN revision: 46682
2010-03-01 11:03:35 +00:00
Sebastian Dransfeld eea9a74ebb Don't do unnecessary strcmp
SVN revision: 45882
2010-02-04 20:02:45 +00:00
Cedric BAIL a61eda93a4 * eet: Add mempool for Eet_Node structure.
SVN revision: 45259
2010-01-17 14:32:58 +00:00
Carsten Haitzler 4070ab5f6a another deadlock in eet - threadsafe goop! fix fix fix!
SVN revision: 44906
2010-01-05 04:40:12 +00:00
Carsten Haitzler 145b7ee2a1 deadlock fuckers! fix! :)
SVN revision: 44179
2009-12-04 01:15:19 +00:00
Cedric BAIL 3836c6d3fc * eet: All this header are not needed in this case.
SVN revision: 44175
2009-12-03 15:47:15 +00:00
Cedric BAIL af13fe5496 * eet: All operation on Eet_File should be thread safe. This should
make use of all eet primitive thread safe now.

	Please any bug or lock that you find.


SVN revision: 44172
2009-12-03 15:35:04 +00:00
Vincent Torri 5a7dd01fed openssl/err.h included twice
SVN revision: 43407
2009-11-02 07:46:48 +00:00
Vincent Torri d416f2d8df formatting
SVN revision: 42979
2009-10-09 05:38:52 +00:00
Vincent Torri ad994b3960 initialize eina first in eet_init().
SVN revision: 42977
2009-10-09 05:07:26 +00:00
Vincent Torri 2d315f76c9 fix eet_init() when called several times but is failing
SVN revision: 42971
2009-10-08 21:16:26 +00:00
Vincent Torri 9e8c44052d simplify eet_init() and eet_shutdown() a bit
SVN revision: 42954
2009-10-08 06:04:03 +00:00
Vincent Torri d26955c432 remove useless Eina_Log macros. Patch by Mathieu Taillefumier.
SVN revision: 42850
2009-10-02 03:59:17 +00:00
Cedric BAIL 5ca2776a01 * eet: Fix some llvm report.
SVN revision: 42816
2009-09-30 10:05:15 +00:00
Gustavo Sverzut Barbieri 183237e348 improve logging messages introduced by Mathieu Taillefumier.
move some to error/critical, remove trailing \n.

NOT doing ChangeLog entry on purpose, it's useless as it's an
intra-release change (changes the previous unlreleased change)



SVN revision: 42547
2009-09-17 14:33:06 +00:00
Cedric BAIL cab54bd121 * eet: Use eina_log.
Patch from Mathieu Taillefumier <mathieu.taillefumier@free.fr>.


SVN revision: 42492
2009-09-15 11:22:11 +00:00
Vincent Torri be3e63eb6d et_init should fail if eina_init fails
SVN revision: 42237
2009-09-04 05:03:47 +00:00
Vincent Torri da7d129e2d * remove the inclusion of config.h in Eet_private.h (not needed)
* add config.h in all source file to be consistent, even if it
   is not necessary
 * formatting


SVN revision: 41941
2009-08-23 09:36:43 +00:00
Cedric BAIL fe553249ef * eet: Fix initialization for system that don't support SECMEN.
Note that I don't like this solution, but I didn't see any better one.


SVN revision: 41481
2009-07-23 09:53:44 +00:00
Cedric BAIL 0a6ef8bbde * eet: Reorder gcry init so that it's correctly taken into account by gcry.
SVN revision: 41279
2009-07-08 14:43:20 +00:00
Cedric BAIL 52c7896045 * eet: Add a faster way to compute signature. But currently need my pending patch to GnuTLS
(I need to sign and send this assigment paper) to be usefull.


SVN revision: 40104
2009-04-16 12:15:56 +00:00
Cedric BAIL c392637d27 * eet_lib: Prevent double init of gcry.
SVN revision: 39716
2009-03-25 16:26:46 +00:00
Carsten Haitzler f41991c662 disable fsync
SVN revision: 39542
2009-03-18 01:47:33 +00:00
Gustavo Sverzut Barbieri 3ca2a97471 make sure data is on disk, don't get empty files on ext4/ext3=writeback.
Ok, raster said it would not happen but just crashed my machine and
e.cfg was lost due ext4 being in writeback by default. Accordingly to
Theodore Ts'o
(http://thunk.org/tytso/blog/2009/03/15/dont-fear-the-fsync/) we
should fsync even on open-write-close+rename case.



SVN revision: 39536
2009-03-17 20:49:36 +00:00
Gustavo Sverzut Barbieri b95c69d2f5 Fix problem reported by clang.
TODO: we should review sign of length attributes and make them
consistent whenever possible.

By: Luis Felipe Strano Moraes



SVN revision: 39258
2009-02-26 22:14:14 +00:00
Vincent Torri ca37104eb5 do not include unistd.h if vc++ is used
SVN revision: 39103
2009-02-19 20:31:21 +00:00
Vincent Torri 49f3d0134f Include winsock2.h before time.h. Requested by vc++
SVN revision: 39102
2009-02-19 20:17:14 +00:00
Cedric BAIL 5f0475267c * eet/src/lib/Eet.h,
* eet/src/lib/eet_lib.c,
	* eet/src/lib/eet_cipher.c,
	* eet/src/lib/Eet_private.h: Add a function to retrieve SHA1 of an associated Eet_File.

	Note: Sadly GnuTLS doesn't seem to provide a gnutls_x509_crt_verify_hash function.


SVN revision: 38982
2009-02-09 13:53:20 +00:00
Cedric BAIL 69f1a6a61e Remove dead assignment and change condition for easier match.
SVN revision: 38344
2008-12-29 10:51:38 +00:00
Cedric BAIL bb9eeaa8f0 Add a function to get the raw signature data.
SVN revision: 37809
2008-11-26 10:45:47 +00:00
Cedric BAIL febbf0ab0f Make password callback work (PKCS8 support), fix minor bugs and add more tests.
SVN revision: 37625
2008-11-14 17:34:51 +00:00
Cedric BAIL 0f36b190f1 Add crypto support to eet.
GNUTLS support by Arnaud de Turckheim <quarium@gmail.com>.


SVN revision: 37603
2008-11-13 16:31:13 +00:00
Cedric BAIL 1e13a4aec2 Use eina conversion functions (Remove code from eet).
SVN revision: 36844
2008-10-20 09:44:34 +00:00