Commit graph

952 commits

Author SHA1 Message Date
Klaas Freitag
566f5ce614 Close fd even if its zero. Coverity Found. 2013-07-12 11:41:50 +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
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
Klaas Freitag
c1a73564f5 Fix for coverity CID 1029795 2013-07-08 12:26:44 +02:00
Klaas Freitag
82569559cc Added function to retrieve the progress callback. 2013-07-05 18:41:41 +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
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
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
Olivier Goffart
ed76e5f1f2 Fix conflict file appearing when a file cannot be stated
We still need to fetch the md5 from the database to be able to store it
back.
2013-06-13 15:06:35 +02:00
Olivier Goffart
015eeb1e05 Clean the progress database on csync_commit
It was cleaned twice in csync_destroy because of the conflict resolution

https://github.com/owncloud/mirall/issues/667
2013-06-11 10:24:34 +02:00
Klaas Freitag
32818283a5 Remove default console log of httpbf 2013-06-11 08:53:19 +02:00
Klaas Freitag
4a04b3e184 Use a proper cast in inode query. 2013-06-11 08:47:32 +02:00
Klaas Freitag
bf8188e9e8 Create metadata table if not existing. 2013-06-10 11:48:38 +02:00
Olivier Goffart
f71d4dcc79 Add a log output when the replica is invalid in csync_vio
https://github.com/owncloud/mirall/issues/669
2013-06-10 10:19:46 +02:00
Olivier Goffart
78937b09b8 Clean the rename datastructure in csync_commit
Fixes the crash in mirall issue 670
https://github.com/owncloud/mirall/issues/670
2013-06-10 10:11:13 +02:00
Olivier Goffart
882e027e40 Remove dead condition
rc==123 was a magic value set to mean not to save the error. But after
some refactoring, it is not done like that anymore
2013-06-07 16:43:48 +02:00
Daniel Molkentin
5a2d7e9c9f Do not corrupt ctx->replica value if push_file fails 2013-06-07 14:58:38 +02:00
Klaas Freitag
d9ef991448 Removed unused progress info allocation. 2013-06-07 09:18:27 +02:00
Olivier Goffart
bb03664bfd Let csync_update report the right error.
The problem is that the call to csync_memstat_check will try to open a
file, that will fail on windows and override the errno
2013-06-06 10:44:52 +02:00
Klaas Freitag
f320f9c701 void an unused variable. 2013-06-05 16:39:06 +02:00
Klaas Freitag
e92dd4c1da Removed some logs that are not needed. 2013-06-05 16:35:48 +02:00
Klaas Freitag
cab00ea668 Added missing CloseHandle, detected by Coverty. 2013-06-05 16:34:58 +02:00
Daniel Molkentin
e92a422d3d Send OC-Chunked instead of OC_CHUNKED.
Will still be understood by the server, as PHP mangles the header
to read HTTP_OC_CHUNKED in both cases.
2013-06-03 22:51:28 +02:00
Klaas Freitag
9001dbb082 Use variable verb and avoid warnings. 2013-06-03 17:23:39 +02:00
Olivier Goffart
22a07634b6 Fix upload of big files when proxy remove the OC_CHUNKED header
In that case, the first chun would be uploaded as a chunk.
Take that case into account and if we get a success after only one
chunk, we try to delete the chunk, and it it worked, it means chunking
was not supported.
2013-06-03 17:23:39 +02:00
Klaas Freitag
fe6fdb5e88 Enable NE_LFS, important for Win32 platform. 2013-05-31 13:23:21 +02:00
Klaas Freitag
20969cf6bb Removed an extra space. 2013-05-24 15:43:42 +02:00
Daniel Molkentin
45e5578b52 init to false in case of doubt 2013-05-22 16:15:26 +02:00
Klaas Freitag
92b0af4b0a Compare the correct type. 2013-05-22 16:13:27 +02:00
Klaas Freitag
126559b2be For new databases, skip the is-empty check. 2013-05-22 16:10:43 +02:00
Klaas Freitag
0764ef1620 For directories, do not consider the size as its invalid on remote. 2013-05-22 16:10:43 +02:00
Klaas Freitag
8115f71096 Avoid memory allocation screwup. 2013-05-22 12:33:09 +02:00
Klaas Freitag
4a58cae0b0 Finialize insert statement. 2013-05-22 12:33:09 +02:00
Klaas Freitag
bcdd8b95bf Allow empty MD5 sum on save, happens with directoires. 2013-05-22 12:33:09 +02:00
Klaas Freitag
69d251630f Code cleanups, move closedb out of if statements. 2013-05-22 12:33:09 +02:00
Klaas Freitag
02f93ec4d5 Free allocted memory of local and remote list. 2013-05-22 12:33:09 +02:00
Klaas Freitag
dd8ceacf75 Avoid compile warning due to non-top variable declaration. 2013-05-22 12:33:09 +02:00
Klaas Freitag
673ca36db8 More efficient database writing, do integrity check on db. 2013-05-22 12:33:09 +02:00
Klaas Freitag
68e0dbb18f Use wide character unlink. 2013-05-22 12:32:25 +02:00
Klaas Freitag
4ad01b35ce Switch on full synchronous mode for sqlite. 2013-05-20 11:10:27 +02:00
Klaas Freitag
053a9b7da0 Add neon includes to httpbf build 2013-05-17 12:45:39 +02:00