Gráfico de Commits

34 Commits

Autor SHA1 Mensagem Data
Olivier Goffart d697969f36 Use another way to detect that the server was reconfigured
Before, we would only detect it if all the files were removed, and no
file where added or changed. This may not be enough because there might
be a welcome.txt file. Now, we check that none of the file stays the same,
and some files are removed.

Relates issue #1948
2014-07-15 18:09:08 +02:00
Daniel Molkentin bbf8b9f8dd syncengine: properly initialize all members in ctor
This fixes Coverity CID 12922
2014-06-20 13:28:52 +02:00
Olivier Goffart 0880444e37 Syncengine: Wait for the neon thead to be finished before destroying the Propagator and calling csync_commit
The legacy job might still need the neon session and the propagator.
We need to make sure the thread exits before.

This fixes crash when pausing a sync made with the legacy jobs
(for example when there is network limitation)
This should fix https://github.com/owncloud/enterprise/issues/200
2014-06-18 15:08:23 +02:00
Klaas Freitag b71881d300 SyncEngine: Use QSet for the seenFiles rather than QHash.
We can save some memory here as the seenFiles list can be long.
2014-06-17 16:30:11 +02:00
Olivier Goffart 864f2cdc7d remove the _syncMutex and replace it by a simple bool 2014-05-29 11:35:13 +02:00
Olivier Goffart 99cead68f5 Fix crash when aborting
When aborting, the slotFinished will destroy all the Jobs, but they need
one more even loop to finish cleanups

Fixes #1793
2014-05-26 12:23:25 +02:00
Olivier Goffart bdba56f60b Always wait on the thread before emiting finished
This ensure that there would be no way to have two thread running

Refactor all the location where finished is called in a single function
2014-05-20 12:32:06 +02:00
Olivier Goffart 90ee274744 We need to call csync_commit in every error cases
Else there will still be outdated tree in the memory and the further sync
will be confused

Relates to #1710
2014-05-15 11:18:06 +02:00
Klaas Freitag a50c39cd0c Maintain the original inode value for renamed files.
In case two renames are done on the same file/folder very quickly we
lost the information that the second operation was also a rename. That
was because we tried to get the inode value from a stat on the file once
the first rename was finished. But at that point, the file was already
gone because of the second rename.

Now the original inode is kept and written to db in case the file can
not be stat'ed.

This fixes bug #1737
2014-05-06 12:55:54 +02:00
Olivier Goffart 988c162d2f Have only one place where we read the timeout 2014-05-02 13:04:53 +02:00
Olivier Goffart 9f0848ba15 Merge remote-tracking branch 'origin/libowncloudsync_noqtgui' 2014-04-29 12:23:15 +02:00
Markus Goetz 4489a56c65 Csync: Set error at correct place 2014-04-28 17:25:18 +02:00
Markus Goetz 7f752c7e93 Csync: Plug code for csync_file_locked_or_open 2014-04-28 16:57:56 +02:00
Olivier Goffart 9da261acd8 Do not read from the database when upgrading from 1.5
We need to make sure that the file id are updated (if the user
had upgraded from owncloud 5 to owncloud 6 while using owncloud 1.5)
2014-04-25 13:31:44 +02:00
Markus Goetz 77ac092975 WiP: Attempt to compile without UI 2014-04-21 19:57:15 +02:00
Olivier Goffart fa38bf7029 Make sure the fileid are saved to the database when upgrading from owncloud5 to owncloud6
We fetch the id from the server, but don't save them in the database.

I Could have used INSTRUCTION_UPDATED for that, but then i would need to update the
reconcile algorithm to take in account the fact that UPDATED is possible there.

Instead, use should_update_etag  which means the db is going to be written again

Remove reference to old instruction _UPDATED and _DELETED which does not make sens with
the new propagator

Improve the test to test this case,  and that etags are properly writen to the DB
when there is a fake conflict
2014-04-18 18:27:27 +02:00
Klaas Freitag 82ab5fdcb9 Fix condition if network limit change is logged or not. 2014-04-15 16:28:18 +02:00
Volkan Gezer 8250fb81b3 Fix typo. 2014-04-11 15:10:47 +02:00
Daniel Molkentin 1d70426bb7 Build with BOTH Qt4 and 5 2014-04-07 17:25:25 +02:00
Daniel Molkentin 6a2fe6be67 Build fix: QAtomicInt has no implicit integer conversion in Qt5 2014-04-07 16:49:01 +02:00
Klaas Freitag 9cdcc925c1 Do not log useless stuff. 2014-04-07 15:10:55 +02:00
Klaas Freitag cf87fdff7f Keep the updater data in the log struct for the synclog.
Also, shorten the timestamp and add the sync direction.
2014-04-03 16:56:50 +02:00
Olivier Goffart bfe6a50b19 Fix some error cases in the SyncEngine
Always cleanup properly when we bail out.

Also fix thread safety of the SyncJournalDB
2014-04-01 13:41:47 +02:00
Markus Goetz 54313338cd SyncEngine: new aboutToPropagate signal 2014-03-27 17:04:31 +01:00
Markus Goetz 09e6207ce9 SyncEngine: Fix typo 2014-03-27 15:19:02 +01:00
Klaas Freitag dd6b71bad6 Use a stopwatch to meassure the time consumed. 2014-03-26 18:16:27 +01:00
Klaas Freitag 9af2339596 Store the request duration and timestamp to final item 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
Markus Goetz d5659442b2 SyncEngine: Sanity bail out if DB does not exist suddenly
The update/reconcile worked for me, but the Propagate step had an invalid DB
path but still went on (and then messed things up)
2014-03-26 16:57:50 +01:00
Markus Goetz cc5fabdab0 Engine: Introduce jobCompleted() signal 2014-03-21 17:13:02 +01:00
Olivier Goffart c5f8a2555d Rename _dir to _direction
(to avoid confusion with directory)
2014-03-20 16:42:42 +01:00
Olivier Goffart a1ab9c84c7 Remove FIXME in syncengine 2014-03-20 16:42:42 +01:00
Olivier Goffart f05320c32c Clean the debug a bit 2014-03-17 12:15:16 +01:00
Olivier Goffart 7b482c0e96 Rename CSyncThread to SyncEngine
CSyncThread has not been a thread for a long time now
2014-03-17 11:34:51 +01:00