Commit graph

1979 commits

Author SHA1 Message Date
Andreas Schneider
c1e02db882 BUG 16: Correctly include iconv headers. 2013-07-12 11:32:15 +02:00
Andreas Schneider
81df0406eb cmake: Rewrite FindIconv from scratch.
This version supports BSD correctly.
2013-07-12 11:31:46 +02:00
Klaas Freitag
d0edcd1fba Better do not use the var name abort as it confuses syntax highlighter. 2013-07-11 17:01:49 +02:00
Olivier Goffart
52c7ff415e Fix the test
After commit a25fbb6160, we re compute the
hash before insterint into the db.  Which means that the test need to
have different paths in order to succeed
2013-07-10 12:15:53 +02:00
Olivier Goffart
c20a2bf16b Add a way to configure the block size for httpbf 2013-07-10 12:15:11 +02:00
Daniel Molkentin
d22eb0ceef win32: Read inode values even though file is open
According to MSDN, CreateFile can be passed 0 if only
stat-like info is required.

This allows to upload locked files.
2013-07-10 11:19:07 +02:00
Klaas Freitag
4489eb6cc0 Allow newly created database in test. 2013-07-09 17:31:06 +02:00
Klaas Freitag
b7d549e5a0 Check for zero size database file. 2013-07-09 17:30:40 +02:00
Olivier Goffart
a25fbb6160 Save the right filename in the DB when there are new files on a renamed folder 2013-07-09 16:30:09 +02:00
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