Commit graph

13 commits

Author SHA1 Message Date
Jocelyn Turcotte
3c9acdf724 Fix a crash when accessing a dangling UploadDevice pointer #2984
This is largely a guess, but this is the only place where we use
a QIODevice to push data through QNAM and that the QIODevice isn't
a direct child of the QNetworkReply.

Fix the issue by making sure that we don't go back to the event loop
and possibly handle network events between the destruction of the
upload QIODevice and the QNetworkReply, which might lead to QNAM
dereferencing a dangling QIODevice pointer.
2015-03-23 16:14:54 +01:00
Olivier Goffart
97c221d860 PropagateUpload: add a few comments 2015-03-04 12:00:55 +01:00
Christian Kamm
0af5574951 Propagate upload: code cleanup 2015-01-14 15:20:02 +01:00
Markus Goetz
a544133d73 Propagator: Guard access to BandwidthManager
Shouls fix #2623
2015-01-14 14:28:47 +01:00
Olivier Goffart
3ec19ee355 Propatage upload: Preload the chunk in memory and close the file
This should solve #2675 and #1981

By preloading the chunks in memory before sending them, we don't keep the
file open and therefore we let other program open the file for writing.

If the file is modified between two chunks, we detect that and abort anyway
2015-01-14 13:46:51 +01:00
Olivier Goffart
0215b250af UploadDevice: mark overrided method as Q_DECL_OVERRIDE 2015-01-14 13:46:51 +01:00
Olivier Goffart
7f1593c5d7 PropagateUpload: The PUTJob owns the chunk device, so make it a QScopedPointer instead of a QSharedPointer 2015-01-14 13:46:51 +01:00
Christian Kamm
38ebfec1fb Use global Account/AccountState less.
* Use a shared pointer to Account everywhere to ensure
  the instance stays alive long enough for a sync to terminate
* Folder is now tied to an AccountState
* SyncEngine and OwncloudPropagator tie to an Account and use that
  for all jobs they run

Issue: Since the setup wizard currently always replaces the
account, it will always wipe all folder definitions, even when
the actual changes to the account were minor.
2014-12-18 15:39:51 +01:00
Daniel Molkentin
3016844dd7 Merge branch 'master' into rename_client
Conflicts:
	README.md
	src/gui/folderman.cpp
	src/gui/settingsdialog.cpp
	src/libsync/accessmanager.cpp
	src/libsync/propagateupload.h
2014-12-02 13:37:22 +01:00
Olivier Goffart
ad92e7b888 Move UploadDevice to the right header 2014-11-14 16:40:13 +01:00
Olivier Goffart
c73522de2e Remove ChunkBlock
It is not in used
2014-11-14 16:39:39 +01:00
Daniel Molkentin
281c0e1553 Merge branch 'master' into rename_client
Conflicts:
	CMakeLists.txt
	src/gui/main.cpp
	src/libsync/accessmanager.cpp
	src/libsync/accessmanager.h
	src/libsync/owncloudpropagator_p.h
2014-11-12 00:07:59 +01:00
Olivier Goffart
506ba022f1 Split propagator_qnam.cpp into propagateupload.cpp and propagatedownload.cpp 2014-11-11 12:17:10 +01:00
Renamed from src/libsync/propagator_qnam.h (Browse further)