Commit graph

82 commits

Author SHA1 Message Date
Andreas Schneider
b701bf3d9b csync: Rename UNSPEC_ERROR to UNSUCCESSFUL. 2013-04-06 18:48:16 +02:00
Klaas Freitag
4e6d54194f Check for file equalness after having created a conflict file.
If the files are equal and the conflict was created because the
timestamps were screwed the conflict is removed again. This only
works on the local repository so far.

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-04-06 18:48:11 +02:00
Klaas Freitag
2204c94770 Introduce csync status codes
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-04-05 17:40:22 +02:00
Andreas Schneider
ab70947755 propagate: Fix renaming in the propagation. 2013-03-19 13:56:20 +01:00
Klaas Freitag
cf75a71b8b Make use of push_to_tmp_first function.
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-03-08 15:55:03 +01:00
Klaas Freitag
d7a4a574ab Add a vio capabilites function to let a module define its capabilities.
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-03-08 15:54:55 +01:00
Andreas Schneider
91d92bfa16 log: Add functions to set userdata for the logging callback. 2013-03-01 09:59:55 +01:00
Andreas Schneider
8a0b4319d3 csync: Add a new logging system. 2012-10-30 11:27:21 +01: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
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
a0e0caa5b8 Fix use of strerror_r on non GNU platforms. 2012-03-19 12:40:43 +01:00
Andreas Schneider
f0cf678c0e Fix config checks. 2012-03-02 17:04:02 +01:00
Andreas Schneider
331783baef propagate: Remove dead and wrong assignments. 2012-02-04 12:54:15 +01:00
Andreas Schneider
8e89bfec2b propagate: Fix dead assignment. 2012-02-04 12:47:39 +01:00
Andreas Schneider
9f802a83f3 propagate: Fix some blank lines. 2012-02-04 12:37:33 +01:00
Andreas Schneider
de2cb55f0e propagate: Remove unused variables. 2012-02-04 12:28:51 +01:00
Christian Jann
a8071bfd14 csync.propagator/csync.reconciler first print instruction type,
than print the path and align everything correctly (easier to read)
2011-04-12 17:06:18 +02:00
Christian Jann
aad3e146fc set instruction after conflict backup for the statedb merger to NONE 2011-04-12 10:09:41 +02:00
Christian Jann
d842119065 improved logging 2011-04-06 17:07:20 +02:00
Christian Jann
e4d8e793f6 added new conflict resolution to libcsync
- use the latest version of the two files under its original filename
  in both destinations (same as currently implemented)
- additionally, create a copy of the older file under a different name
  using the same file extension with appended marker (e.g. "conflict")
  and timestamp in both destinations
  (e.g. textfile.odt -> textfile_conflict-20100222-105000.odt)
- At the Moment 'textfile_conflict-20100222-105000.odt' is only created
  on the side where the conflict has occurred and gets synced to the other side
  on the second sync.
2011-04-06 16:57:24 +02:00
Andreas Schneider
fdea54edc5 Fix the vim modlines. 2009-05-13 10:12:07 +02:00
Andreas Schneider
e69976bc88 Fix a bug where the wrong function for deletion was executed.
Thanks to David Wooldridge for all the testing.
2009-01-23 14:07:34 +01:00
Andreas Schneider
1047431e4c Fix a typo. 2008-12-13 23:29:16 +01:00
Andreas Schneider
3b51103a60 Implement own function to create a random filename.
This removes an uneeded syscall to lstat by mktemp at this point.
2008-11-13 15:11:02 +01:00
Andreas Schneider
0681db0efe Reduce system calls of getuid and geteuid. 2008-11-13 14:08:26 +01:00
Andreas Schneider
1e70c74037 Set the replica to destination only once. 2008-11-13 14:06:22 +01:00
Andreas Schneider
17b39a78c1 Fix open and use the flags variable. 2008-11-12 21:14:35 +01:00
Andreas Schneider
1b4e340565 Fix compiler warnings. 2008-09-11 14:16:04 +02:00
Andreas Schneider
e25422ba3f Fix the formating not be be longer than 80 chars. 2008-09-05 13:28:30 +02:00
Andreas Schneider
971e3301e3 Add some comments. 2008-09-02 11:43:29 +02:00
Andreas Schneider
6d3a7d84c1 Fix flags for the statedb tree merger. 2008-09-02 11:42:34 +02:00
Andreas Schneider
33681552c7 Remove useless error message. 2008-08-22 15:27:27 +02:00
Andreas Schneider
ebfbcf18a5 Handle no space left on device. 2008-08-22 15:26:02 +02:00
Andreas Schneider
8451d29d12 Replace strerror with thread safe version. 2008-07-18 11:35:02 +02:00
Andreas Schneider
e5286c7c8a Rename journal functions to statedb. 2008-07-09 10:10:00 +02:00
Andreas Schneider
dc964a4c9a Only run chmod if we are root. 2008-07-03 11:34:34 +02:00
Andreas Schneider
70ca880a05 Set the right instruction during propagation for the journal. 2008-06-28 17:18:10 +02:00
Andreas Schneider
259319f4f9 Stop synchronization if quota exceeded. 2008-06-28 15:33:52 +02:00
Andreas Schneider
5d35a46d07 More printf fixes. 2008-06-27 19:05:54 +02:00
Andreas Schneider
bd8034170a Fix printf attributes. 2008-06-27 18:52:09 +02:00
Andreas Schneider
e9cfa4e610 Remove accidently commited debug message. 2008-06-27 16:12:26 +02:00
Andreas Schneider
bcbf4f02f5 Fix debug output and add more output. 2008-06-25 13:43:47 +02:00
Andreas Schneider
e795539137 Create files and directories with a default mode again and run chmod.
The chmod function is only called if the file we synchronize has a
different mode set.
2008-06-24 18:02:00 +02:00
Andreas Schneider
75c22fce6c Improve debug and error messages. 2008-06-24 18:01:43 +02:00
Andreas Schneider
aee15d55ee Improve debug message. 2008-06-24 13:34:27 +02:00
Andreas Schneider
902b588d60 Close the files after copy. 2008-06-18 16:30:00 +02:00
Andreas Schneider
8f427a8ccb Set instruction to UPDATED for newly created files.
This is needed that csync knows which file stats need to be updated. We
need the new inode number for the journal.
2008-06-18 10:44:40 +02:00
Andreas Schneider
7935d63098 Don't add deleted files to the journal. 2008-06-18 09:56:08 +02:00
Andreas Schneider
4246190524 Set O_NOATIME if we are the owner of the file or a superuser. 2008-06-16 17:49:45 +02:00