Commit graph

916 commits

Author SHA1 Message Date
Olivier Goffart
6e6e18c030 Exclude lists: Works with \r\n line terminator 2012-11-07 17:46:13 +01:00
Olivier Goffart
62897e6d37 Win: Load the exclude lists in the config 2012-11-07 17:46:13 +01:00
Olivier Goffart
f55f687a63 Win: Don't rely on the name of the program to be owncloud.exe
Loosely based on the logic in csync_vio_init
2012-11-07 17:46:13 +01:00
Olivier Goffart
a4db29c277 c_copy: return error code on windows if there is an error
This fixes a compiler warning about not returning a value
2012-11-07 17:46:13 +01:00
Markus Goetz
80d53ff4bd Enable compilation with static iniparser and sqlite 2012-11-07 17:46:13 +01:00
Olivier Goffart
be13ef120d Fix another crash if the md5 are not computed 2012-11-07 16:50:20 +01:00
Klaas Freitag
67373dcb0d commented work in progress treewalk stuff. 2012-11-07 12:33:39 +01:00
Olivier Goffart
1a093b0ae3 Fix crash if md5 is null
Also make sure to copy destpath, to avoid double free.
2012-11-06 14:05:52 +01:00
Olivier Goffart
7071a455c5 Use signed hash in SQL request
sqlite only handle signed integer,  in case of overflow, we numbers are
transformed to floating point, resulting in wierd errors.
2012-11-06 14:05:52 +01:00
Klaas Freitag
898d51f92d WIP: Try to catch a cleared remote path 2012-10-31 21:38:57 +01:00
Klaas Freitag
e183854b58 Added experimental function to check if a file is known locally. 2012-10-31 21:33:17 +01:00
Klaas Freitag
af11613fba Some cleanup of platform specific code. 2012-10-31 21:09:33 +01:00
Klaas Freitag
2fa07b1dd9 set pointer void to avoid warning on linux compile. 2012-10-31 21:08:40 +01:00
Klaas Freitag
abb3829197 Use win32 function GetFileTime to fix DTS problems on windows. 2012-10-31 20:56:24 +01:00
Klaas Freitag
4104737533 Hide the journal database under windows using win32 API. 2012-10-31 20:56:06 +01:00
Andreas Schneider
0a6d7435b5 cmake: Get rid of log4c. 2012-10-30 11:27:21 +01:00
Andreas Schneider
0179c2249d statedb: Log an error if we can't open the database. 2012-10-30 11:27:21 +01:00
Andreas Schneider
8a0b4319d3 csync: Add a new logging system. 2012-10-30 11:27:21 +01:00
Andreas Schneider
95b367dd23 csync: Add option to set and get log verbosity. 2012-10-30 11:27:20 +01:00
Andreas Schneider
890df87d00 csync: Add support for a log callback. 2012-10-30 11:27:20 +01:00
Klaas Freitag
8afe182e0c Fix merge: Initialise data before accessing them. 2012-10-28 11:31:25 +01:00
Klaas Freitag
2bb52ef6f9 Merge branch 'master' into dav - get cmocka tests and database move.
Conflicts:
	CMakeLists.txt
	cmake/Modules/FindCMocka.cmake
	src/csync.c
	src/csync_exclude.c
	src/csync_reconcile.c
	src/csync_statedb.c
	src/csync_update.c
	src/csync_util.c
	src/vio/csync_vio.c
	tests/CMakeLists.txt
	tests/csync_tests/check_csync_exclude.c
	tests/csync_tests/check_csync_statedb_load.c
	tests/csync_tests/check_csync_statedb_query.c
	tests/csync_tests/check_csync_update.c
	tests/std_tests/check_std_c_path.c
2012-10-27 19:27:14 +02:00
Andreas Schneider
805621540a csync: Move auth callback to a common struct. 2012-10-27 15:29:00 +02:00
Klaas Freitag
557b4bbe25 Use LIKE instead of GLOB to find files in dirs in database.
This fixes Github issue mirall#25
2012-10-27 12:03:39 +02:00
Klaas Freitag
0db9427377 Add name of rename target to treewalk data structure. 2012-10-26 20:01:25 +02:00
Klaas Freitag
8bdf0694ca Another rename issue to ocsync instead of csync. 2012-10-26 19:59:45 +02:00
Klaas Freitag
d82850f145 Fix more csync->ocsync renaming issues. 2012-10-26 16:11:34 +02:00
Andreas Schneider
14f03e0ebb exclude: Simplify the csync_excluded() loop.
Thanks to Klaas Freitag.
2012-10-22 15:32:28 +02:00
Andreas Schneider
51ce3bea37 exclude: Reduce memory allocations of csync_excluded(). 2012-10-22 15:13:02 +02:00
Andreas Schneider
9b11339a9e util: Remove obsolete csync_create_statedb_hash(). 2012-10-22 14:55:26 +02:00
Andreas Schneider
f92b8f1db7 exclude: Make sure we don't sync the csync_journal.db. 2012-10-22 14:55:26 +02:00
Andreas Schneider
76e6fbb72f csync: Move the statedb (journal) to the local directory. 2012-10-22 14:53:59 +02:00
Andreas Schneider
42421cb4cc exclude: Rework csync_excluded() to not leak memory on error. 2012-10-22 14:53:27 +02:00
Andreas Schneider
d507358c95 exclude: Fix build warning. 2012-10-22 14:39:03 +02:00
Klaas Freitag
01a25db3fb exclude: Fix checking the exclude pattern for subdirs.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-10-22 12:26:35 +02:00
Andreas Schneider
31382d909e vio: Fix a build warning. 2012-10-22 11:21:34 +02:00
Andreas Schneider
68abef8626 util: Improve statedb hashing function to avoid possible data loss.
The statedb hash function only hashes the remote side and not the local
path. So if a user changes to a new empty directory to sync it with the
remote counter part, csync will delete all files.

This will result in a new full sync for all sync setups, but we will not
loose any data.
2012-10-22 11:00:51 +02:00
Andreas Schneider
12d5d012f3 lock: Use a secure umask for mkstemp(). 2012-10-19 20:37:13 +02:00
Andreas Schneider
5844b203e6 file: Use a smaller buffer value for c_copy(). 2012-10-19 20:37:13 +02:00
Andreas Schneider
6dbdbf0997 dir: Don't leak resources on error in c_rmdirs().
Found by Coverity.
2012-10-19 20:37:13 +02:00
Andreas Schneider
6ae00fe3b2 csync: Don't leak memory on error in csync_create().
Found by Coverity.
2012-10-19 20:37:13 +02:00
Andreas Schneider
6023db367b update: Fix a memory leak in _csync_detect_update().
Found by Coverity.
2012-10-19 20:37:13 +02:00
Andreas Schneider
47f1560d87 update: Don't leak dh on error.
Found by Coverity.
2012-10-19 20:37:13 +02:00
Andreas Schneider
b4464bd92f statedb: Don't leak the file descriptior on error.
Found by Coverity.
2012-10-19 20:37:13 +02:00
Andreas Schneider
1d8378e307 statedb: Ensure we don't leak memory in csync_statedb_query().
Found by Coverity.
2012-10-19 20:37:13 +02:00
Andreas Schneider
b330df73a1 vio: Fix a possible resource leak in csync_vio_local_creat().
Found by Coverity.
2012-10-19 20:37:13 +02:00
Andreas Schneider
2e01dc8d88 vio: Fix a possible resource leak in csync_vio_local_open().
Found by Coverity.
2012-10-19 20:37:13 +02:00
Andreas Schneider
4010096cdf exclude: Rework _csync_exclude_add() to check for no memory.
Found by Coverity.
2012-10-19 20:37:13 +02:00
Andreas Schneider
ade066a6c1 lock: Ensure we don't call close() on negative numbers on error.
Found by Coverity.
2012-10-19 19:46:34 +02:00
Andreas Schneider
6456cc36a5 file: Ensure we don't call close() on negative numbers on error.
Found by Coverity.
2012-10-19 19:42:04 +02:00
Andreas Schneider
f124810059 lock: Make sure we have pid value in the correct range.
Found by Coverity.
2012-10-19 19:38:05 +02:00
Andreas Schneider
3f02bf7990 csync: Rework _csync_treewalk_visitor().
This fixes some possible null pointer defererences.

Found by Coverity.
2012-10-19 19:24:07 +02:00
Andreas Schneider
81a0dc8cb0 rbtree: Fix finding the node with a NIL child.
Found by Coverity.
2012-10-19 19:14:54 +02:00
Andreas Schneider
06cb39e1e1 propagate: Fix a possible null pointer deference.
Found by Coverity.
2012-10-19 19:07:15 +02:00
Benjamin Legrand
cb8a501241 Fix a typeo and rename REPLCIA to REPLICA.
BUG #8

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-10-19 15:59:51 +02:00
Klaas Freitag
aad8e5320a Some more memory cleanups after valgrinding. 2012-10-18 13:26:44 +02:00
Klaas Freitag
cc28d22c96 Removed overwhelming logging. 2012-10-18 13:26:44 +02:00
Klaas Freitag
9d126bc45a Set version to next tag 0.60.1 2012-10-16 15:48:13 +02:00
Klaas Freitag
5c780e99be Remove sqlite specific code here and use csync_statedb_get_below.
This also fixes an escaping problem with path names with
apostrophes, reported in bug genie #oc-1997.
2012-10-16 13:14:45 +02:00
Klaas Freitag
4682afc2bc Added function csync_statedb_get_below_path. 2012-10-16 13:14:04 +02:00
Klaas Freitag
687efaaaf6 Some more memory free - after valgrind analyze. 2012-10-16 11:52:50 +02:00
Klaas Freitag
7c20897036 Also reset read_from_db flag in context in error case. 2012-10-16 11:52:11 +02:00
Klaas Freitag
e89c6dc256 Free md5 memory when destroying. 2012-10-16 09:47:07 +02:00
Andreas Schneider
2ddccf6c16 propagate: Fix build on systems without atime support.
This fixes bug #6.
2012-10-15 21:27:17 +02:00
Klaas Freitag
48eec357d7 Push version to 0.60.0 - final release for owncloud client 1.1.0 2012-10-10 12:10:07 +02:00
Klaas Freitag
a9e544fd7d renamed config files and dirs to ocsync. 2012-10-05 14:38:33 +02:00
Klaas Freitag
b039b5642f Copy csync.conf from ~/.csync/ if existing. 2012-10-04 13:56:30 +02:00
Klaas Freitag
fbb88abe85 Clear memory and fix zero return type for _get_stat_by_hash 2012-10-04 13:03:42 +02:00
Klaas Freitag
2ec0b63f98 Migrate existing database from $HOME/.csync if non exists at config dir. 2012-10-04 13:02:38 +02:00
Klaas Freitag
207c8d9786 Set version to 0.50.11 - for ownCloud 1.1.0 beta3 2012-10-04 12:59:38 +02:00
Klaas Freitag
404073fe7f Rename csync to ocsync to not collide with upstream csync. 2012-10-01 12:39:05 +02:00
Daniel Molkentin
6c33462842 Remove redundant code block 2012-09-27 10:05:06 +02:00
Daniel Molkentin
4bae545c90 vio plugin loading: cut of filename regardless of length. 2012-09-27 10:05:01 +02:00
Klaas Freitag
2af0d6f1a4 Be careful with memory, some fixes for that. 2012-09-26 15:32:38 +02:00
Klaas Freitag
004f5ccce6 Fix state change for deleted or not longer existing directories. 2012-09-26 12:46:59 +02:00
Klaas Freitag
7b16fcf2a4 Avoid useless warnings. 2012-09-26 12:45:24 +02:00
Klaas Freitag
b976ac914d Also check the files basename against the exclude pattern. 2012-09-25 15:41:55 +03:00
Klaas Freitag
34249e9f64 Use destination path in case of file rename. 2012-09-24 15:57:32 +03:00
Klaas Freitag
2354b9c52f Fix detection of local file renames. 2012-09-24 15:56:42 +03:00
Klaas Freitag
77e79ea767 For rename, retrieve the new id and set in local tree. 2012-09-24 15:55:18 +03:00
Klaas Freitag
128926cac7 Check path for len exactly 1 when comparing on '.'. 2012-09-24 15:54:17 +03:00
Klaas Freitag
7a70a6fa69 Update version to 0.50.10 2012-09-20 17:57:58 +03:00
Klaas Freitag
44a6cf9bfc Remove wrong free. 2012-09-20 17:54:23 +03:00
Klaas Freitag
fc6cd714c7 win32: Fix random file name generation, init random generator once.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-09-04 12:19:12 +02:00
Klaas Freitag
50f698673c Update version number to 0.50.9 2012-08-30 18:45:36 +03:00
Klaas Freitag
08f7fbbd71 Fix printf argument for win32 platform. 2012-08-30 17:01:52 +03:00
Klaas Freitag
caa1945daa Added another check on file length. 2012-08-30 15:45:45 +03:00
Klaas Freitag
6fbc510aeb Free memory of id_list lists. 2012-08-30 13:05:24 +03:00
Klaas Freitag
ffc5e6f0cc Memory cleanups for id syncing, removed unused code. 2012-08-30 13:04:48 +03:00
Klaas Freitag
7600eb4a09 Memory cleanups for id syncing. 2012-08-30 13:04:14 +03:00
Klaas Freitag
d756c45c50 Free memory used by the id in csync_file_stat. 2012-08-30 13:01:21 +03:00
Klaas Freitag
99691059bf Removed all usage of openSSL. 2012-08-29 15:37:31 +03:00
Klaas Freitag
ae94ce7430 Check if the file id method exists in the vio plugin. 2012-08-29 13:34:21 +03:00
Klaas Freitag
3950b18dc7 Fix memory leaks in new id sync code. 2012-08-28 17:53:26 +03:00
Klaas Freitag
4750380565 Fix flag setting detection of the fields. 2012-08-28 17:52:28 +03:00
Klaas Freitag
c491e8bb68 Check for valid result count after query. 2012-08-28 14:09:54 +03:00
Klaas Freitag
78c43e542c Handle zero result list correctly. 2012-08-28 14:09:29 +03:00
Klaas Freitag
3b369c8b03 More robust query result access if columns are missing. 2012-08-26 20:07:36 +02:00
Klaas Freitag
ef64756334 Merge branch 'md5' of ssh://milliways.cryptomilk.org/users/freitag/csync into fastsync
Conflicts:
	modules/csync_owncloud.c
	src/csync_private.h
	src/csync_propagate.c
	src/csync_reconcile.c
	src/csync_statedb.c
2012-08-23 18:04:32 +03:00
Klaas Freitag
2420eeffd1 Read remote file tree from db if id has not changed. 2012-08-23 17:55:39 +03:00
Klaas Freitag
5b5fe29eb5 Make sqlite_query function able to deal with multiple row queries. 2012-08-23 17:54:36 +03:00
Klaas Freitag
cf8f31914a Added a file type column to the database. 2012-08-23 17:53:53 +03:00
Klaas Freitag
1dc50eea5d Decide if the file tree is read from db or stat'ed 2012-08-23 17:50:30 +03:00
Klaas Freitag
1e41c469f0 Add the dbtree function module. 2012-08-23 17:49:47 +03:00
Klaas Freitag
e349df9f4c Added flag to indicate to read the remote filetree from db. 2012-08-23 17:49:18 +03:00
Klaas Freitag
8876658810 Added functions to read the file tree from database. 2012-08-23 17:48:24 +03:00
Klaas Freitag
e9cf546818 Free the memory for the MD5 string. 2012-08-23 17:44:07 +03:00
Klaas Freitag
97a7e46595 Set to INSTRUCTION_UPDATED only for NONE instructions. 2012-08-23 17:44:07 +03:00
Klaas Freitag
7f7c2b977c Avoid a null pointer dereference. 2012-08-23 17:44:07 +03:00
Klaas Freitag
337c56da66 Fix: If no database entry exists, the status is set to NEW. 2012-08-23 17:44:07 +03:00
Klaas Freitag
a0353249f1 Remove a database column comment that just blows the log file. 2012-08-23 17:44:07 +03:00
Klaas Freitag
868a07c322 Update the md5 also if the instruction is not UPDATE. 2012-08-23 17:44:07 +03:00
Klaas Freitag
f4c9ced446 Handle ID change propagation to the top directory. 2012-08-23 17:43:51 +03:00
Klaas Freitag
1c6da9c0bb Update the md5 sum of files in merge. 2012-08-23 17:43:51 +03:00
Klaas Freitag
e3638ced2c Add csync_get_file_id function for modules. 2012-08-23 17:43:51 +03:00
Klaas Freitag
62b49e8bcc Query ids from database for local files, remove bogus code. 2012-08-23 17:43:51 +03:00
Klaas Freitag
9bd9949d68 Fixed merge conflict, only one md5 needed. 2012-08-23 17:43:21 +03:00
Klaas Freitag
ede710843b Added csync_vio_file_id function and removed unused previous code. 2012-08-23 17:42:51 +03:00
Klaas Freitag
20f4ee16cc removed unneeded initialisations. 2012-08-23 17:42:33 +03:00
Klaas Freitag
3fb3f78446 Add a visible log entry at program start, easier to read log output. 2012-08-23 17:41:53 +03:00
Klaas Freitag
d8967a2bd1 try to propagate EVAL status up by detecting changes in underlying
directories. That does not work as the reconciler runs through the
directoires in the wrong order, ie. the outermost first.
2012-08-23 17:41:53 +03:00
Klaas Freitag
c2e2f8de00 more md5 calculations 2012-08-23 17:41:53 +03:00
Klaas Freitag
f2d603108a more logging, ids added. 2012-08-23 17:41:53 +03:00
Klaas Freitag
ae1b8a5682 Query new id for local repository because of utimes changes. 2012-08-23 17:41:53 +03:00
Klaas Freitag
0618eb956d Merge conflicts solved. 2012-08-23 17:40:36 +03:00
Klaas Freitag
ae5394ad75 UniqID based syncing, first WIP state. 2012-08-23 17:38:44 +03:00
Klaas Freitag
d2ba37a419 Resolved merge conflict. 2012-08-23 17:38:25 +03:00
Klaas Freitag
8e401e662f MD5 Support WIP 2012-08-23 17:34:19 +03:00
Klaas Freitag
943e960bc0 Fixed merge conflict. 2012-08-23 17:34:02 +03:00
Klaas Freitag
2a40106e70 Fixed merge conflict. 2012-08-23 17:33:41 +03:00
Klaas Freitag
faf1970e3a Avoid a null pointer dereference. 2012-08-20 19:11:46 +03:00
Klaas Freitag
ec63ab4e16 Fix: If no database entry exists, the status is set to NEW. 2012-08-20 19:11:18 +03:00
Klaas Freitag
4a6b0e7241 Remove a database column comment that just blows the log file. 2012-08-20 19:10:29 +03:00
Klaas Freitag
bc1e59a048 Update the md5 also if the instruction is not UPDATE. 2012-08-20 19:10:03 +03:00
Klaas Freitag
d9267f7928 Handle ID change propagation to the top directory. 2012-08-17 16:48:56 +03:00
Klaas Freitag
972412e436 Update the md5 sum of files in merge. 2012-08-17 16:48:15 +03:00
Klaas Freitag
38cf0f2704 Add csync_get_file_id function for modules. 2012-08-17 16:46:50 +03:00
Klaas Freitag
0443764308 Query ids from database for local files, remove bogus code. 2012-08-17 16:46:07 +03:00
Klaas Freitag
7dcb9ffdeb Added id lists to context type and removed change counter. 2012-08-17 16:45:12 +03:00
Klaas Freitag
fcba1cefce Added csync_vio_file_id function and removed unused previous code. 2012-08-17 16:44:38 +03:00
Klaas Freitag
bac0002eeb Add a visible log entry at program start, easier to read log output. 2012-08-17 16:42:23 +03:00
Klaas Freitag
0147063090 try to propagate EVAL status up by detecting changes in underlying
directories. That does not work as the reconciler runs through the
directoires in the wrong order, ie. the outermost first.
2012-08-15 16:32:10 +03:00
Klaas Freitag
19f52313a8 more md5 calculations 2012-08-15 12:46:36 +03:00
Klaas Freitag
142ef140f0 more logging, ids added. 2012-08-14 16:32:23 +03:00
Klaas Freitag
eb019905e4 Query new id for local repository because of utimes changes. 2012-08-14 16:31:52 +03:00
Klaas Freitag
b37096354f Fix url to calculate hash 2012-08-14 16:31:01 +03:00
Klaas Freitag
cf24513879 Merge branch 'dav' of ssh://milliways.cryptomilk.org/users/freitag/csync into md5
Conflicts:
	modules/csync_owncloud.c
	src/csync_private.h
	src/csync_reconcile.c
	src/vio/csync_vio.c
2012-08-13 15:24:15 +03:00
Klaas Freitag
2bc171e520 Set version to 0.50.8 2012-08-09 17:07:44 +03:00
Klaas Freitag
76b09b3c14 Fix rename: Exclude directories and set mtimes accordingly. 2012-08-09 16:59:08 +03:00
Klaas Freitag
452babe593 Improved error report on proxy- and connection problems. 2012-08-09 15:12:22 +03:00
Klaas Freitag
cbb09aeb0a Sync based on uniqIDs WIP 2012-08-06 09:22:21 +02:00
Klaas Freitag
3ae996c688 Fixed rename support for Win32. Need to use unit64 instead of ino_t. 2012-08-03 18:48:44 +03:00
Klaas Freitag
253605758e Use remote rename if local rename is detected. 2012-08-02 16:58:54 +03:00
Klaas Freitag
5b38e2cb5a Improved logging in error case (minor fix). 2012-07-31 17:58:49 +03:00
Klaas Freitag
abef7eb3d2 UniqID based syncing, first WIP state. 2012-07-31 11:40:46 +03:00
Thomas Mueller
d4e808d45a use custom FindOpenSSL only for cross compilation in any other cases it is used from the local system 2012-07-30 13:27:59 +03:00
Thomas Mueller
9134955899 use custom FindOpenSSL only for cross compilation in any other cases it is used from the local system 2012-07-26 14:57:15 +03:00
Klaas Freitag
1352f6bc39 MD5 Support WIP 2012-07-24 09:36:06 +02:00
Klaas Freitag
85993d2650 Don't override error code set by timedif in vio init 2012-07-19 21:21:33 +02:00
Klaas Freitag
1104619a52 No atime on apple platform. 2012-07-19 21:11:35 +02:00
Klaas Freitag
b57f33353d fixed copy and paste errors in error output. 2012-07-19 21:06:18 +02:00
Klaas Freitag
cad3da10db Merge branch 'timedelta' into dav 2012-07-19 15:53:12 +02:00
Klaas Freitag
2b4261f15a Added functions to generate MD5-Sums based on openssl with tests. 2012-07-18 17:00:46 +02:00
Klaas Freitag
1866956984 use lstat instead of stat to stat files. Avoids problems with links. 2012-07-11 16:48:38 +02:00
Klaas Freitag
e90b4a13b3 Added logging of the time values. 2012-07-11 16:05:40 +02:00
Klaas Freitag
59202fffe4 fixed spaces and logging if timesync is needed for the module. 2012-07-11 16:03:31 +02:00
Klaas Freitag
0ed8c57cad make proper logging of the module capabilities. 2012-07-09 16:46:14 +02:00
Klaas Freitag
bcb31b6998 Merge branch 'dav' of ssh://milliways.cryptomilk.org/users/freitag/csync into dav
Conflicts:
	src/csync.c
	src/csync_propagate.c
	src/std/c_private.h
	src/vio/csync_vio.c
2012-07-09 16:39:11 +02:00
Klaas Freitag
7fb929a82d use lstat instead of stat for local files, fix oCB #713. 2012-07-09 16:15:27 +02:00
Klaas Freitag
43685f69a3 do the capabilities after the module was initialized. 2012-07-09 14:45:05 +02:00
Klaas Freitag
b9329f2991 undef malloc only if not doing UNIT_TESTING. 2012-07-09 14:09:34 +02:00
Klaas Freitag
c0f1f36f59 Fix condition on when atomar push is allowed, never for local files. 2012-07-09 13:26:20 +02:00
Dominik Schmidt
77d71eb080 Load plugins on MacOSX. 2012-07-09 13:26:20 +02:00
Klaas Freitag
065529642e Ability to push to remote without using a tempfile to copy to.
Modules such as ownCloud make sure anyway that the upload to a
remote resource happens atomar. This patch allows to switch off
the default behaviour of first copying to a temp file in the
same directory. Use csync_set_remote_push_atomar function to
switch off.
2012-07-09 13:26:20 +02:00
Klaas Freitag
037532d73b win32: Fix random file name generation, init random generator once. 2012-07-09 13:26:20 +02:00
Klaas Freitag
09b82ea7cd do not log on stderr on MacOSX because that spams system log 2012-07-09 13:26:00 +02:00
Klaas Freitag
f802b54f6f set version to 0.50.7 2012-07-09 13:26:00 +02:00
Klaas Freitag
62acdc3b8c win32: use wide char variant of CopyFile for file copy. 2012-07-09 13:26:00 +02:00
Klaas Freitag
d7deaf3448 win32: Use wide character variant of GetSpecialFolderPath to get home. 2012-07-09 13:26:00 +02:00
Klaas Freitag
9f900266f4 Added a newline in case the logging callback is zero. 2012-07-09 13:25:59 +02:00
Klaas Freitag
f2439d83f0 Fix wide character support for the mkdir definition. 2012-07-09 13:25:59 +02:00
Klaas Freitag
5734a31b60 Add ability to log to a callback for the csync library. 2012-07-09 13:25:59 +02:00
Klaas Freitag
03476b3a11 Set the correct define to the new released version 0.50.6. 2012-07-09 13:25:59 +02:00
Klaas Freitag
a47ddb59ae Win32: Chdir to app path before searching module relative. 2012-07-09 13:25:59 +02:00
Klaas Freitag
1d55691e75 Do not log on Apple by default as that goes to ASL 2012-07-09 13:25:59 +02:00
Klaas Freitag
b261ecb705 Do proper handling of Win32 special characters.
Introduced a tchar based handling of wide character encoding that
is happening on Windows platforms.
2012-07-09 13:25:59 +02:00
Klaas Freitag
1fe093b6b6 Fixed local treewalk function filter comment. 2012-07-09 13:25:59 +02:00
Klaas Freitag
992f0d6b87 ownCloud: set correct module load error code. 2012-07-09 13:25:59 +02:00
Klaas Freitag
1939ea93f5 Moved error_code to context for thread savety. 2012-07-09 13:25:46 +02:00
Klaas Freitag
c1c36a15c4 Pushed version to 0.50.5 and lib version 0.1.5 for next oC release. 2012-07-09 13:25:46 +02:00
Klaas Freitag
ecb409bc06 Added errnos to the timediff function to allow specific error reports. 2012-07-09 13:25:46 +02:00
Dominik Schmidt
d5de27f289 Apple: Fix loading plugins inside bundles. 2012-07-09 13:25:33 +02:00
Dominik Schmidt
a216790c28 do plugins on apple 2012-07-09 13:25:11 +02:00
Dominik Schmidt
8d5af96f46 Compile cstdlib with -fPIC 2012-07-09 13:25:11 +02:00
Dominik Schmidt
fcb3aa6208 Define O_NOATIME to 0 if it's not there 2012-07-09 13:24:15 +02:00
Klaas Freitag
8be6ebb1de Push csync release to next internal beta 0.50.4. 2012-07-09 13:23:49 +02:00
Klaas Freitag
221de3c866 Added a csync_errno function to provide more info for clients. 2012-07-09 13:23:49 +02:00
Klaas Freitag
dc2148aa15 Removed a stat call that is just for a file size check. 2012-07-09 13:23:48 +02:00
Klaas Freitag
e28c530d13 Version to 0.50.3 for a next beta 2012-07-09 13:23:48 +02:00
Klaas Freitag
de209ecdb9 ownCloud: Don't require time sync between server and client. 2012-07-04 16:32:17 +02:00
Klaas Freitag
6eb4e707d9 Add module capability about if a post copy size check is required. 2012-07-04 15:03:15 +02:00
Klaas Freitag
8ba2f483bf Add a vio capabilites function to let a module define its capabilities. 2012-07-04 13:56:24 +02:00
Klaas Freitag
98bc5098c9 Merge branch 'dav' of ssh://milliways.cryptomilk.org/users/freitag/csync into dav
Conflicts:
	src/csync_propagate.c
2012-07-01 15:27:41 +02:00
Klaas Freitag
f31c74743c Fix condition on when atomar push is allowed, never for local files. 2012-06-26 18:30:50 +02:00
Klaas Freitag
8034da83cc Ability to push to remote without using a tempfile to copy to.
Modules such as ownCloud make sure anyway that the upload to a
remote resource happens atomar. This patch allows to switch off
the default behaviour of first copying to a temp file in the
same directory. Use csync_set_remote_push_atomar function to
switch off.
2012-06-26 18:30:50 +02:00
Klaas Freitag
92ec13d886 win32: Fix random file name generation, init random generator once. 2012-06-26 18:30:50 +02:00
Klaas Freitag
e129d02024 do not log on stderr on MacOSX because that spams system log 2012-06-26 18:28:38 +02:00
Klaas Freitag
d3d3454aaa Set csync version to 0.50.7. 2012-06-26 18:28:18 +02:00
Klaas Freitag
cd7aec1636 Do not log "module not found" messages if there is a second try. 2012-06-26 18:28:18 +02:00
Klaas Freitag
6fc93f64a4 win32: use wide char variant of CopyFile for file copy. 2012-06-26 18:28:18 +02:00
Klaas Freitag
4253194fa0 win32: Use wide character variant of GetSpecialFolderPath to get home. 2012-06-26 18:28:18 +02:00
Klaas Freitag
1fe6db6b2b Fix wide character support for the mkdir definition. 2012-06-26 18:28:18 +02:00
Klaas Freitag
5e040d47d6 Add ability to log to a callback for the csync library. 2012-06-26 18:28:07 +02:00
Klaas Freitag
84bf91b711 Win32: Chdir to app path before searching module relative. 2012-06-26 18:28:07 +02:00
Klaas Freitag
7ec663a0c6 Do not log on Apple by default as that goes to ASL 2012-06-26 18:28:07 +02:00
Klaas Freitag
36cf074337 Set version to 0.50.6 for next oC version. 2012-06-26 18:27:47 +02:00
Klaas Freitag
a0fe623ab6 Do proper handling of Win32 special characters.
Introduced a tchar based handling of wide character encoding that
is happening on Windows platforms.
2012-06-26 18:27:47 +02:00
Klaas Freitag
2fb8672d3e Fixed local treewalk function filter comment. 2012-06-26 18:27:26 +02:00
Dominik Schmidt
02b617b536 Load plugins on MacOSX. 2012-06-26 18:24:39 +02:00
Dominik Schmidt
4c6a1356a1 Compile cstdlib with -fPIC. 2012-06-26 18:24:39 +02:00
Klaas Freitag
798dbb408f Pushed version to 0.50.5 and lib version 0.1.5 for next oC release. 2012-06-26 18:24:39 +02:00
Dominik Schmidt
56e6b900db Define O_NOATIME to 0 if it's not there 2012-06-26 18:24:39 +02:00
Klaas Freitag
531c09f5b3 Push csync release to next internal beta 0.50.4. 2012-06-26 18:24:39 +02:00
Klaas Freitag
b0f6602681 Added a csync_errno function to provide more info for clients. 2012-06-26 18:24:08 +02:00
Klaas Freitag
55c3b0862c Zero'ed a stat call that is just for a file size check. 2012-06-26 18:20:16 +02:00
Klaas Freitag
9286647262 Version to 0.50.3 for a next beta 2012-06-26 18:20:16 +02:00
Klaas Freitag
357b5cd5f3 Ability to push to remote without using a tempfile to copy to.
Modules such as ownCloud make sure anyway that the upload to a
remote resource happens atomar. This patch allows to switch off
the default behaviour of first copying to a temp file in the
same directory. Use csync_set_remote_push_atomar function to
switch off.
2012-06-22 15:32:04 +02:00
Klaas Freitag
9836ec864a win32: Fix random file name generation, init random generator once. 2012-06-20 10:40:40 +02:00
Klaas Freitag
26aff2d744 Bumped version to 0.50.7 2012-06-18 17:25:32 +02:00
Andreas Schneider
28e4963647 time: Make the timediff a hidden file. 2012-06-18 16:20:28 +02:00
Klaas Freitag
370e2e451f do not log on stderr on MacOSX because that spams system log 2012-06-18 13:02:06 +02:00
Klaas Freitag
c1953d61c7 Do not log "module not found" messages if there is a second try. 2012-06-18 10:43:07 +02:00
Klaas Freitag
9b64825c69 win32: use wide char variant of CopyFile for file copy. 2012-06-13 17:32:13 +02:00
Klaas Freitag
26191448e7 win32: Use wide character variant of GetSpecialFolderPath to get home. 2012-06-13 17:30:50 +02:00
Klaas Freitag
d1ae05166d Added a newline in case the logging callback is zero. 2012-06-08 12:52:48 +02:00
Klaas Freitag
13847b9249 Fix wide character support for the mkdir definition. 2012-06-08 12:52:06 +02:00
Klaas Freitag
39534fb5de Add ability to log to a callback for the csync library. 2012-06-05 17:11:33 +02:00
Klaas Freitag
17450f1f4b Set the correct define to the new released version 0.50.6. 2012-05-21 09:43:42 +02:00
Klaas Freitag
7f9003bc83 Win32: Chdir to app path before searching module relative. 2012-05-18 12:56:03 +02:00
Klaas Freitag
a9ac5bf752 Do not log on Apple by default as that goes to ASL 2012-05-16 12:42:00 +02:00
Klaas Freitag
33d1825551 Merge branch 'dav' of http://git.csync.org/users/freitag/csync into dav
Conflicts:
	src/csync.c
2012-05-15 16:17:51 +02:00
Klaas Freitag
a198f36bf5 ownCloud: set correct module load error code. 2012-05-15 16:15:27 +02:00
Klaas Freitag
9ec8d70822 Do proper handling of Win32 special characters.
Introduced a tchar based handling of wide character encoding that
is happening on Windows platforms.
2012-05-09 16:55:56 +02:00
Klaas Freitag
81a6b49c07 Fixed local treewalk function filter comment. 2012-05-07 15:47:57 +02:00
Klaas Freitag
d9ae749dcf Merge branch 'dav' of ssh://milliways.cryptomilk.org/users/freitag/csync into dav
Conflicts:
	modules/csync_owncloud.c
	src/csync.h
2012-05-04 14:25:01 +02:00
Klaas Freitag
522a6e27a2 Set module load error code after csync_vio_init failed. 2012-05-04 12:07:20 +02:00
Klaas Freitag
2b5d31b29e Moved error_code to context for thread savety. 2012-05-04 12:07:20 +02:00
Klaas Freitag
73bcdb73a7 Added errnos to the timediff function to allow specific error reports. 2012-05-04 12:05:45 +02:00
Dominik Schmidt
c4667c893b Fix loading plugins inside MacOSX bundles. 2012-05-04 12:05:22 +02:00
Dominik Schmidt
4c98f6bcd8 Load plugins on apple. 2012-05-04 12:04:36 +02:00
Dominik Schmidt
a8c10780f2 Compile cstdlib with -fPIC. 2012-05-04 12:04:30 +02:00
Dominik Schmidt
5ac2f676d7 Define O_NOATIME to 0 if it's not there. 2012-05-04 12:03:53 +02:00
Klaas Freitag
e4fae59bcf Added a csync_errno function to provide more info for clients. 2012-05-04 12:00:46 +02:00
Klaas Freitag
0d71347508 Removed a stat call that is just for a file size check. 2012-05-04 12:00:46 +02:00
Klaas Freitag
cc5d2866b1 Set module load error code after csync_vio_init failed. 2012-04-19 16:12:05 +02:00
Klaas Freitag
6f51876b45 Moved error_code to context for thread savety. 2012-04-17 12:31:27 +02:00
Dominik Schmidt
13f05db934 cmake: Make Log4C optional.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-04-17 11:21:03 +02:00
Klaas Freitag
44a078b991 Win32: Add win32 rename function that overwrites existing targets.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-04-17 10:49:51 +02:00
Klaas Freitag
0bedd5d9a3 Win32: Disabled Query per inode, always returning NULL.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-04-17 10:49:29 +02:00
Klaas Freitag
ec921a1e51 Win32: Added some specific headers to c_private.h to fix build.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-04-17 10:47:56 +02:00
Andreas Schneider
fdc1a71050 csync: Use uint32_t for uid and gid. 2012-04-17 10:46:58 +02:00
Klaas Freitag
d2ae109cc3 Win32: substitute uid_t and gui_t and removed a not needed include.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-04-17 10:46:04 +02:00
Klaas Freitag
2ac172f4fe update: Add new exported file tree traverse functions.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-04-17 10:45:04 +02:00
Klaas Freitag
f0d2943e5f Do not bail out if the config can't be read, use default values.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-04-17 10:42:36 +02:00
Klaas Freitag
5e7d5c983a win32: Copy the default conf file from the application dir.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-04-17 10:42:01 +02:00
Klaas Freitag
f292c01eac Read $HOME variable first before checking the password file entry.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-04-17 10:40:35 +02:00
Klaas Freitag
871dde4911 Added ability to limit the csync run to the local tree only.
That gives apps the chance to use the efficient treewalk of csync
to get information on the tree.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-04-17 10:40:21 +02:00
Klaas Freitag
53263a2685 owncloud: set _fmode variable to set file ops to binary mode.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-04-17 10:40:21 +02:00
Klaas Freitag
db614ecf34 Pushed version to 0.50.5 and lib version 0.1.5 for next oC release. 2012-04-17 10:36:52 +02:00
Klaas Freitag
e32d02c984 Added errnos to the timediff function to allow specific error reports. 2012-04-16 09:33:40 +02:00
Dominik Schmidt
f355bef266 Fix loading plugins inside bundles 2012-04-15 14:36:11 +02:00
Dominik Schmidt
8312e4430c do plugins on apple 2012-04-15 14:13:07 +02:00
Dominik Schmidt
d768ad7f0f Compile cstdlib with -fPIC 2012-04-14 14:54:14 +02:00
Dominik Schmidt
7b2d1da3b7 Define O_NOATIME to 0 if it's not there 2012-04-14 03:13:28 +02:00
Klaas Freitag
6620d68c5e Push csync release to next internal beta 0.50.4. 2012-04-14 03:13:28 +02:00
Klaas Freitag
285baa6fb7 Added a csync_errno function to provide more info for clients. 2012-04-14 03:13:27 +02:00
Klaas Freitag
10c11cc5e8 Removed a stat call that is just for a file size check. 2012-04-14 03:13:27 +02:00
Klaas Freitag
a64ce22997 Win32: Add win32 rename function that overwrites existing targets. 2012-04-14 03:13:27 +02:00
Klaas Freitag
270a4262b4 Win32: Disabled Query per inode, always returning NULL. 2012-04-14 03:13:27 +02:00
Klaas Freitag
b815e169f1 ownCloud: Disabled useless debugging output. 2012-04-14 03:13:27 +02:00
Klaas Freitag
3979492914 Version to 0.50.3 for a next beta 2012-04-14 03:13:27 +02:00
Klaas Freitag
a4865cfdf4 Win32: Added some specific headers to c_private.h to fix build. 2012-04-14 03:13:27 +02:00
Klaas Freitag
4730d80738 Win32: substitute uid_t and gui_t and removed a not needed include. 2012-04-14 03:13:27 +02:00
Klaas Freitag
254045780a Add new exported file tree traverse functions. 2012-04-14 03:13:27 +02:00
Klaas Freitag
4a0713370e Do not bail out if the config can't be read, use default values. 2012-04-14 03:13:27 +02:00
Klaas Freitag
1634a8bdf4 Win32: copy the default conf file from the application dir. 2012-04-14 03:13:27 +02:00
Klaas Freitag
48579fe73f Disable config file copy for Win32 platform. 2012-04-14 03:13:27 +02:00
Klaas Freitag
becb03ad97 Read $HOME variable first before checking the password file entry. 2012-04-14 03:13:27 +02:00
Klaas Freitag
1a329539ec Added ability to limit the csync run to the local tree only.
That gives apps the chance to use the efficient treewalk of csync
to get information on the tree.
2012-04-14 03:13:26 +02:00
Klaas Freitag
b6ad8635d6 owncloud: set _fmode variable to set file ops to binary mode. 2012-04-14 03:13:26 +02:00
Klaas Freitag
f7c8e9f26c std: Renamed struct_stat to csync_stat_t and use c_private.h again.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-04-14 03:13:26 +02:00
Dominik Schmidt
9d73d7705d Make LOG4C optional 2012-04-14 00:05:52 +02:00
Klaas Freitag
3ae453cc36 std: Renamed struct_stat to csync_stat_t and use c_private.h again.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2012-03-21 13:48:41 +01:00
Klaas Freitag
dbc9576876 Fix use of strerror_r on non GNU platforms. 2012-03-19 12:40:43 +01:00
Klaas Freitag
6300e78816 Fix use of strerror_r on non GNU platforms. 2012-03-19 12:40:43 +01:00
Klaas Freitag
8b9c10246e Fix use of strerror_r on non GNU platforms. 2012-03-19 12:40:43 +01:00
Klaas Freitag
f0a84bb5da Fix use of strerror_r on non GNU platforms. 2012-03-19 12:40:43 +01:00
Klaas Freitag
a0e0caa5b8 Fix use of strerror_r on non GNU platforms. 2012-03-19 12:40:43 +01:00
Klaas Freitag
ffd2e0e767 Fixed file copy for Win32 platform by using API function FileCopy. 2012-03-19 12:40:30 +01:00
Andreas Schneider
e409d0fae9 time: Use correct abs() function for long long. 2012-03-07 16:17:43 +01:00