Improve FindBFD.cmake #144

Open
wants to merge 106 commits into
from

Conversation

Projects
None yet

junghans commented Nov 3, 2012

Test if bfd.h can be included and only then set BFD_FOUND to true.

@junghans junghans closed this Nov 4, 2012

@junghans junghans reopened this Nov 4, 2012

junghans and others added some commits Nov 3, 2012

Fix binutils compilation error
bfd.h now required PACKAGE and PACKAGE_VERSION to be defined, set these
in CMakeList.txt
Update State.cc
Added (boost::uint64_t) to State:Write for correct size of int
Add delay before auth token refresh
This is sometimes necessary to prevent too frequent requests.
Fix hang when upload receives HTTP 500
When an uploading PUT request got a HTTP 500 as reponse, grive hanged
forever inside libcurl. This was because the File parameter was not
rewound to 0 position on retry. The XmlResponse had to be cleared as
well.

Rewinding the File and clearing the XmlResponse were not enough to fix
the problem, because when retrying after 500, HTTP 410 Gone or 412
Precondition failed is often received, and CheckHttpResponse would throw
an exception that crashes grive. Therefore, I implemented a retry logic
to Resource::Upload that retries the whole upload transaction if 410 or
412 was received.
Retry upload on XML error instead of crashing
Sometimes the Google Drive API sends malformed XML which crashes grive.
This patch adds a simple try-catch to Resource::Upload that retries the
upload if an XML exception is thrown from AuthAgent::Put.
Fix hang when upload receives HTTP 500
When an uploading PUT request got a HTTP 500 as reponse, grive hanged
forever inside libcurl. This was because the File parameter was not
rewound to 0 position on retry. The XmlResponse had to be cleared as
well.

Rewinding the File and clearing the XmlResponse were not enough to fix
the problem, because when retrying after 500, HTTP 410 Gone or 412
Precondition failed is often received, and CheckHttpResponse would throw
an exception that crashes grive. Therefore, I implemented a retry logic
to Resource::Upload that retries the whole upload transaction if 410 or
412 was received.
Retry upload on XML error instead of crashing
Sometimes the Google Drive API sends malformed XML which crashes grive.
This patch adds a simple try-catch to Resource::Upload that retries the
upload if an XML exception is thrown from AuthAgent::Put.
Add delay before auth token refresh
This is sometimes necessary to prevent too frequent requests.
Remove . restrictions.
Signed-off-by: Jerome Maloberti <jmaloberti@gmail.com>
Merge pull request #1 from vitalif/master
Allow to sync just one directory in the root
Adds a few useful scripts for auto upload
and periodic download sync
Merge branch 'master' of https://github.com/jar1karp/grive
Conflicts:
	libgrive/src/drive/Resource.cc
	libgrive/src/protocol/AuthAgent.cc

Merge with jar1karp/grive
Merge branch 'master' of https://github.com/chreekat/grive
Conflicts:
	cmake/Modules/FindYAJL.cmake

merge with chreekat/grive
Merge branch 'master' of https://github.com/vitalif/grive
Conflicts:
	bgrive/CMakeLists.txt
	libgrive/CMakeLists.txt
	libgrive/src/drive/State.cc
	libgrive/src/drive/State.hh
	libgrive/src/util/Config.cc

Merge branch 'master' of https://github.com/vitalif/grive
Merge branch 'master' of https://github.com/davidedg/grive
Conflicts:
	libgrive/src/drive/State.cc
Merge branch 'master' of https://github.com/fhowar/grive
Conflicts:
	CMakeLists.txt
	libgrive/src/drive/State.cc
	libgrive/src/drive/State.hh
Merge branch 'master' of https://github.com/ColinKinloch/grive
Conflicts:
	cmake/Modules/FindJSONC.cmake
	libgrive/CMakeLists.txt
Merge branch 'master' of https://github.com/meisterT/grive
Conflicts:
	libgrive/src/drive/State.cc
Merge branch 'master' of https://github.com/jeromemaloberti/grive
Conflicts:
	libgrive/CMakeLists.txt
	libgrive/src/drive/State.cc
Merge branch 'master' of https://github.com/DeeToTheVee/grive
Conflicts:
	libgrive/src/drive/State.cc
Merge https://github.com/jorti/grive
Conflicts:
	cmake/Modules/FindJSONC.cmake
Merge https://github.com/JarekSed/grive
Conflicts:
	libgrive/src/drive/State.cc
Merge pull request #3 from ottxor/master
Check if bfd.h can be included (fixes #72)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment