Commit graph

529 commits

Author SHA1 Message Date
Klaas Freitag
9f9209bba0 lock: Use wide char types for lock functions.
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-07-23 07:31:16 +02:00
Klaas Freitag
78605ac6cc exclude: Fix a double close().
CID: #996802

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-07-22 15:53:10 +02:00
Klaas Freitag
def897ca67 exclude: Use mbchar to open exclude file.
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-07-22 15:51:26 +02:00
Klaas Freitag
cd0b85dec5 exclude: Preinitialize memory with zero.
CID: #996807

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-07-22 15:48:20 +02:00
Klaas Freitag
722a556a90 std: Fix a memory on error in c_compare_file().
CID: #996811

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-07-22 15:39:23 +02:00
Klaas Freitag
4be88b68cc csync: Fix possible null pointer dereferences in tree walkers.
CID: 1032801
CID: 1032804

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-07-22 15:38:55 +02:00
Klaas Freitag
0876c18ec9 std: Fix a memleak on error in c_iconv().
CID: #1032806

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-07-22 15:38:39 +02:00
Klaas Freitag
7c4c7f1b04 std: Fix memleak on error in c_rename().
CID: #1032807

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-07-22 15:11:57 +02:00
Klaas Freitag
047cf69f1e std: Fix file descriptor checks.
CID: #1032809
CID: #1032808

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-07-22 15:11:51 +02:00
Andreas Schneider
866af5bf24 std: Add missing includes for memset and uintptr_t. 2013-07-15 08:05:19 +02:00
Andreas Schneider
73fa5f2224 std: Fix const handling on Linux and BSD. 2013-07-14 16:01:51 +02:00
Andreas Schneider
7c9de0230f cmake: Fix names of the include dirs. 2013-07-14 15:57:30 +02:00
Andreas Schneider
341e0e8967 cmake: Fix iconv detection on FreeBSD. 2013-07-14 15:51:09 +02:00
Andreas Schneider
6b189316ab cmake: Require at least version 3.3.9 for sqlite3_prepare_v2(). 2013-07-13 09:17:40 +02:00
Klaas Freitag
38f19a6ada CID 1032814: Don't deref a NULL pointer in _csync_walk_tree().
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-07-12 12:08:03 +02:00
Andreas Schneider
c1e02db882 BUG 16: Correctly include iconv headers. 2013-07-12 11:32:15 +02:00
Andreas Schneider
98ea781550 std: Define ENODATA if not present.
Fix for FreeBSD.
2013-07-08 18:28:37 +02:00
Klaas Freitag
0682dfbc38 c_parse_uri: Handle out of memory condition with ENOMEM.
Fixes https://open.cryptomilk.org/issues/13

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-07-08 15:51:48 +02:00
Klaas Freitag
bf6a0ea68e Use unsuspicous var name to not confuse syntax highlighter.
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-07-08 15:51:41 +02:00
Klaas Freitag
5f9913570a std: Handle NULL pointer argument in c_dir() correctly. 2013-07-04 15:13:39 +02:00
Andreas Schneider
8f7900ee8f statedb: Make sure we call sqlite3_close on a valid pointer. 2013-07-04 12:26:22 +02:00
Andreas Schneider
47b436c279 vio: Add missing internal prototype. 2013-07-04 12:17:02 +02:00
Andreas Schneider
bfdd73a0bc statedb: Fix a build error. 2013-07-04 12:16:47 +02:00
Klaas Freitag
cb65273ef9 statedb: Check db integrity and only overwrite the old on success. 2013-07-04 11:40:23 +02:00
Klaas Freitag
64925efe18 std: Fix resource leak and return code of win32 copy function. 2013-07-04 11:36:10 +02:00
Andreas Schneider
a1628c8111 vio: Make csync_vio_getfd() useable by the module. 2013-07-04 11:30:54 +02:00
Klaas Freitag
12bca2789a propagate: Use get/put methods for file up- and download. 2013-07-04 11:30:54 +02:00
Klaas Freitag
ec6f40c84e vio: Add new function csync_vio_put and csync_vio_put.
With that, modules can implement get and put functions to up- and
download files from or to a given file descriptor. That is just an
alternative way of the usual read/write way that is still there
of course.

If a module wants to implement get and put, it has to set its
capabilities to true.
2013-07-04 11:30:48 +02:00
Klaas Freitag
527da08d3b src: Add function csync_vio_local_getfd(). 2013-07-04 10:48:03 +02:00
Klaas Freitag
123472e286 src: Add function csync_vio_convert_file_stat(). 2013-07-04 10:39:59 +02:00
Klaas Freitag
0a29be89ca cmake: Check for __mingw_asprintf for asprintf replacement.
This is required since mingw32 4.8.
2013-07-04 10:35:47 +02:00
Klaas Freitag
8da59de17b std: Define O_NOATIME if not already defined. 2013-07-04 10:35:06 +02:00
Andreas Schneider
d43b382089 tests: Fix testing the vio plugins. 2013-07-04 10:29:48 +02:00
Andreas Schneider
8953ed544c statedb: Remove context where it isn't needed. 2013-07-04 10:29:48 +02:00
Andreas Schneider
d05b077851 statedb: Always pass down the db pointer. 2013-07-04 10:29:19 +02:00
Andreas Schneider
22477b23a6 statedb: Never overwrite data set by the user!
Only a user of csync is allowed to call csync_set_userdata(). Never call
this inside of csync cause you will overwrite the data pointer and
information is lost!
2013-06-23 14:50:49 +02:00
Stefan Agner
33eaf7e7b0 statedb: use ctx when opening database for integrity check
Signed-off-by: Stefan Agner <stefan@agner.ch>
2013-06-23 14:03:27 +02:00
Andreas Schneider
d864899ff1 src: Fix a build warning. 2013-06-10 16:17:33 +02:00
Andreas Schneider
85a858b7ed src: Fix creating the inode system on 32bit system. 2013-06-10 16:08:14 +02:00
Klaas Freitag
5852a2dd06 Create an empty metadata table if non exists. 2013-06-07 16:09:07 +02:00
Klaas Freitag
fbfba8bfbb Add another database integrity check on startup to avoid corrupt dbs. 2013-06-07 16:08:45 +02:00
Klaas Freitag
e4e30e2cdd Use multibyte version of open in database version check. 2013-06-05 17:59:34 +02:00
Klaas Freitag
23912a7214 Reworked database writing code. Speed improvement > 50%. 2013-05-20 12:24:55 +02:00
Klaas Freitag
12b57124a4 Add a progress callback for overall and individual file up and download
progress.
2013-05-06 17:14:17 +02:00
Klaas Freitag
4ce67e38d1 Fix printf operator to interpret phash correctly for sqlite3. 2013-05-06 16:27:11 +02:00
Andreas Schneider
9409d1c96e If there is no vio commit function don't fail. 2013-04-24 14:35:19 +02:00
Klaas Freitag
b09093a496 Make csync_commit and csync_destroy more readable. 2013-04-24 14:22:54 +02:00
Klaas Freitag
3b6d1cab91 Test for csync_commit 2013-04-24 14:21:51 +02:00
Klaas Freitag
fef18208d6 Add module method for csync_commit. 2013-04-24 14:21:51 +02:00
Klaas Freitag
98e6d3818f Allow windows to load user exclude list. 2013-04-24 14:21:51 +02:00