Commit graph

37 commits

Author SHA1 Message Date
Olivier Goffart
82c254fecf propagator_qnam: Avoid using too much memory
The idea here was that the buffer would be maximum 8KiB, not minimum.
2014-07-08 15:30:53 +02:00
Daniel Molkentin
6b041b0846 Fix use-after-free in QNAM propagator
This fixes Coverity CID 12929
2014-06-20 10:58:03 +02:00
Klaas Freitag
2d234cd96f Propagator: Handle file open error properly and log error message. 2014-06-16 13:35:50 +02:00
Klaas Freitag
1230e87330 Propagator: Give a more specific error message on file remove.
If the file is removed during it is synced up, there is now a correct
error message saying that, rather than "the file has changed during
upload."
2014-06-16 13:34:59 +02:00
Olivier Goffart
6e10b8c5c4 Propagator: Recover from 'precondition failed' error
When we detect a precondition failed, it is possible that it is
because the etag in the database is wrong.  We must therefore not
read from the database on the next sync.  In order to avoid that, we
reset the etag of parent directories to invalid values

Fixes #1767
2014-06-03 17:22:40 +02:00
Klaas Freitag
449c00f019 No need to check for case preserving filesystem here.
That is done in the utility function instead.
2014-05-26 18:28:52 +02:00
Volkan Gezer
9abffdb1a6 fix typo 2014-05-24 15:04:42 +02:00
Klaas Freitag
bbdf7bf955 Check for case clash on downloads. 2014-05-23 18:58:21 +02:00
Klaas Freitag
370dd99e47 Super useful source comment. 2014-05-06 09:30:50 +02:00
Olivier Goffart
2e76fe87c2 Fix reporting the right error in a GET
We always reported the lack of e-tag instead of the real error
2014-05-02 17:26:28 +02:00
Olivier Goffart
988c162d2f Have only one place where we read the timeout 2014-05-02 13:04:53 +02:00
Olivier Goffart
88cb047197 Add a timeout when using the QNAM propagation 2014-04-30 18:17:49 +02:00
Klaas Freitag
df8b5b1ea6 Removed unused Q_OBJECT 2014-04-30 13:55:40 +02:00
Markus Goetz
925c6485e6 Propagator: Dont show silly string for non-error 2014-04-30 11:36:57 +02:00
Olivier Goffart
d62deabf9b Fix updating mtime
Fixup commit 9193286fc1
Use the right URL for the PROPPATCH and HEAD, do not let other
jobs start when we wait for the UpdateMTimeAndETagJob
Update the etag and the fileid of the real item.
2014-04-30 10:24:17 +02:00
Olivier Goffart
9193286fc1 Support old server which do not have the x-oc-mtime support
Owncloud 4.5
Or owncloud 5 with chunking

Fixes https://github.com/owncloud/core/issues/8392
2014-04-29 16:58:24 +02:00
Olivier Goffart
f2519e9d87 Fix function signature: pass argument by const reference 2014-04-22 19:52:09 +02:00
Markus Goetz
197d180cb9 Propagator: Add support for CSYNC_CONFLICT_FILE_USERNAME 2014-04-22 16:17:49 +02:00
Markus Goetz
4be20db670 Propagator: Add makeConflictFileName function 2014-04-22 16:07:18 +02:00
Olivier Goffart
3fac5f91c8 In case of error, report the right error instead of missing etag
also, missing etag is not a fatal error
2014-04-22 12:43:38 +02:00
Klaas Freitag
3d67d203fe Fix content-length calculation for sizes multiple of the chunk size. 2014-04-07 16:29:06 +02:00
Markus Goetz
d35c0f3ade Propagator: Fix chunking for real
The reset() (using seek()) didn't work.
2014-04-05 14:26:24 +02:00
Markus Goetz
0f7d448058 Propagator: Fix chunking 2014-04-04 15:41:35 +02:00
Olivier Goffart
a1fc7f0a25 Make the chunk size configurable via an environement variable
OWNCLOUD_CHUNK_SIZE
2014-03-28 11:11:02 +01:00
Klaas Freitag
505429b582 Add a duration and the repsonse timestamp to the jobs. 2014-03-26 18:16:27 +01:00
Klaas Freitag
6e6f647c63 Change data type for fileId to QByteArray. 2014-03-26 18:12:22 +01:00
Olivier Goffart
38344589c4 Exxtract the exception message from reply to PUT
Might be usefull to debug Internal Server Error

Fixes #1366
2014-03-26 12:02:22 +01:00
Olivier Goffart
ebeb668a62 QNAM jobs: Make sure there is an etag is proper and not changed when one resume
Those tests are existing on the legacy jobs.

We check there is an etag so we make sure a proxy is not in between.
(We have seen user complaining because their proxy is replacing the
pages with one that says they need to enter their login and password)

Also it is important to check that the etag has not changed if we resume
(this may happen if the file is changed on the server between the update
phase and the propagate phase,  and that we resume this file)
2014-03-20 13:31:42 +01:00
Olivier Goffart
05d3273591 Detect the error that may happen when downloading a file 2014-03-20 11:35:30 +01:00
Olivier Goffart
aacc278583 Refactor the progress
Consider that there might be several files processed at the same time
2014-03-14 13:32:32 +01:00
Olivier Goffart
feb49b2768 Saner defaults 2014-03-06 20:34:11 +01:00
Olivier Goffart
4e25595520 Better error classification 2014-03-06 20:33:17 +01:00
Olivier Goffart
ac393c6374 Do not sent more chunk and cancel the upload when the file change while uploading chunks 2014-03-06 16:04:32 +01:00
Olivier Goffart
96c535d712 Make the parrallel uploaded also check for problem in Shared 2014-02-27 14:13:22 +01:00
Olivier Goffart
496d900fee Refactor the renameReplace in its own function
Share a bit more code between legacy and qnam download job
2014-02-18 14:05:52 +01:00
Olivier Goffart
f7419094f3 move the file system helpers in their own file 2014-02-18 12:54:40 +01:00
Olivier Goffart
c32beb957d Move the jobs around between files
Renamed owncloudpropagator_qnam  to propagator_qnam
Move the jobs in propagatorjobs.cpp
Move the neon jobs that have a qnam equivalent into propagator_legacy.cpp and
rename the jobs accordingly
2014-02-18 12:21:05 +01:00
Renamed from src/mirall/owncloudpropagator_qnam.cpp (Browse further)