From 5f72a811c1304885766d8594ae12f57709387b72 Mon Sep 17 00:00:00 2001 From: Xinan Lin Date: Sat, 11 Feb 2023 18:26:02 +0900 Subject: [linux] Report error message if failed to send http request If symupload client failed to connect the backend, we need this error message to be exposed. This could help the failure we are facing in official staging builders. BUG=chromium:1401761 TEST=NA Change-Id: Ic720aff9cb523c38553d6c02bf72aa5b95e862a7 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4240299 Reviewed-by: Nelson Billing --- src/common/linux/libcurl_wrapper.cc | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/common/linux/libcurl_wrapper.cc') diff --git a/src/common/linux/libcurl_wrapper.cc b/src/common/linux/libcurl_wrapper.cc index a53087d9..c4a174a8 100644 --- a/src/common/linux/libcurl_wrapper.cc +++ b/src/common/linux/libcurl_wrapper.cc @@ -303,12 +303,10 @@ bool LibcurlWrapper::SendRequestInner(const string& url, (*easy_getinfo_)(curl_, CURLINFO_RESPONSE_CODE, http_status_code); } -#ifndef NDEBUG if (err_code != CURLE_OK) fprintf(stderr, "Failed to send http request to %s, error: %s\n", url.c_str(), (*easy_strerror_)(err_code)); -#endif Reset(); -- cgit v1.2.3 From f5123d71965578abf905d6388a79a232597bb1eb Mon Sep 17 00:00:00 2001 From: Ian Barkley-Yeung Date: Fri, 24 Feb 2023 11:14:53 -0800 Subject: Add #include to the beginning of all cc files Added #ifdef HAVE_CONFIG_H #include #endif to the beginning of all source files that didn't have it. This ensures that configuration options are respected in all source files. In particular, it ensures that the defines needed to fix Large File System issues are set before including system headers. More generally, it ensures consistency between the source files, and avoids the possibility of ODR violations between source files that were including config.h and source files that were not. Process: Ran find . \( -name third_party -prune \) -o \( -name '.git*' -prune \) -o \( \( -name '*.cc' -o -name '*.c' \) -exec sed -i '0,/^#include/ s/^#include/#ifdef HAVE_CONFIG_H\n#include \/\/ Must come first\n#endif\n\n#include/' {} + \) and then manually fixed up src/common/linux/guid_creator.cc, src/tools/solaris/dump_syms/testdata/dump_syms_regtest.cc, src/tools/windows/dump_syms/testdata/dump_syms_regtest.cc, src/common/stabs_reader.h, and src/common/linux/breakpad_getcontext.h. BUG=google-breakpad:877 Fixed: google-breakpad:877 TEST=./configure && make && make check TEST=Did the find/sed in ChromeOS's copy, ensured emerge-hana google-breakpad worked and had fewer LFS violations. TEST=Did the find/sed in Chrome's copy, ensured compiling hana, windows, linux, and eve still worked (since Chrome doesn't used config.h) Change-Id: I16cededbba0ea0c28e919b13243e35300999e799 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/4289676 Reviewed-by: Mike Frysinger --- src/common/linux/libcurl_wrapper.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/common/linux/libcurl_wrapper.cc') diff --git a/src/common/linux/libcurl_wrapper.cc b/src/common/linux/libcurl_wrapper.cc index c4a174a8..2b639098 100644 --- a/src/common/linux/libcurl_wrapper.cc +++ b/src/common/linux/libcurl_wrapper.cc @@ -26,6 +26,10 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#ifdef HAVE_CONFIG_H +#include // Must come first +#endif + #include #include -- cgit v1.2.3