Commit graph

2120 commits

Author SHA1 Message Date
Olivier Goffart
68a427d7e4 Make sure the directory after a rename has a md5
If not when we do a read from db later, the updater will beleive the
directory is no longer on the server
2013-07-09 16:29:21 +02:00
Olivier Goffart
73ef2c1b6f Do RENAMES before any PUT
In order to fix mirall issue #731
where one rename a file then re-create the original
2013-07-09 16:29:03 +02:00
Klaas Freitag
5f0f49b5bd Use new c_rename function. 2013-07-09 11:13:58 +02:00
Klaas Freitag
3a51c9ce8b Added rename function to csync library. 2013-07-09 11:11:49 +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
c1a73564f5 Fix for coverity CID 1029795 2013-07-08 12:26:44 +02:00
Klaas Freitag
2befdf50da Fix coverity CID 1029796 2013-07-08 12:26:44 +02:00
Klaas Freitag
6898d96a5c Do not store userdata but retrieve dynamically through csync API. 2013-07-05 18:43:29 +02:00
Klaas Freitag
82569559cc Added function to retrieve the progress callback. 2013-07-05 18:41:41 +02:00
Klaas Freitag
5f9913570a std: Handle NULL pointer argument in c_dir() correctly. 2013-07-04 15:13:39 +02:00
Klaas Freitag
e5089943ba std: Check c_dir() not just with NULL. 2013-07-04 15:13:03 +02:00
Andreas Schneider
bd6608a33d tests: Refactor treewalk test. 2013-07-04 15:11:26 +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
Andreas Schneider
cd23f8d2d1 CID 1033195: Fix resource leak. 2013-07-04 11:57:31 +02:00
Andreas Schneider
bd6a66d51e tests: Fix a resource leak. 2013-07-04 11:55:55 +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
Klaas Freitag
f8e31b95b1 tests: Remove the db before db_none test to meet the test condition. 2013-07-04 11:34:43 +02:00
Klaas Freitag
fb48813f15 owncloud: Use the new get/put methods of file up- and download. 2013-07-04 11:30:54 +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
fbfa3426e2 tests: Fix multibyte stat(). 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
cccbb6699a cmake: Find SMBClient correctly. 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
Klaas Freitag
ce6cf57a29 Make test work again by not writing the db. 2013-07-04 10:28:55 +02:00
Klaas Freitag
7eb3f901a6 Experimental: Fix the mv and recreate case as described in mirall#731.
Please note that this needs review and test and probably does not fully
fix it. It just makes sure that renames are handled before PUTs.
2013-07-03 22:38:45 +02:00
Klaas Freitag
7ef620f58d Merge remote-tracking branch 'ogoffart/dav' into dav 2013-07-03 16:36:28 +02:00
Klaas Freitag
44a52ad951 Removed useless logging. 2013-07-03 16:32:33 +02:00
Olivier Goffart
f8fdff885e Make sure to write the errors in the DB as well.
If a file can't be uploaded, we still need to write it into the DB if it
was in the DB before, with the old timestamp.
2013-07-02 23:07:37 +02:00
Olivier Goffart
1c9fa48d60 Create a function to free a csync_file_stat 2013-07-02 18:25:17 +02:00
Olivier Goffart
270e06a99b Fix a possible leak 2013-07-02 17:42:47 +02:00
Daniel Molkentin
1a25644d60 Fix version number 2013-06-25 09:52:44 +02:00
Daniel Molkentin
8a8d98d401 Changelog 2013-06-25 09:47:47 +02:00
Daniel Molkentin
16d99b8ff8 0.80 for ownCloud 1.3 2013-06-25 09:25:34 +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
Daniel Molkentin
77653747ac 0.70.93 2013-06-20 19:45:18 +02:00
Olivier Goffart
0dbecb129e Log the fact that csync was aborted 2013-06-19 18:41:30 +02:00
Olivier Goffart
3d2c3b321c Disable the blacklist by default
The blacklist might hide errors and reduce the ability to do proper
diagnostics.

Note that in _csync_push_file, we kept csync_statedb_get_progressinfo
because it is also used for the resume feature

Also added output when a file has been blacklisted.
2013-06-18 19:19:28 +02:00