diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-06-03 13:26:46 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-06-04 08:42:18 +0000 |
commit | 660b91b07788077cfee9ba309d45db6819c00781 (patch) | |
tree | 14c2ac49b139ac500b0d74d9c28cbbff09ba2ecd /desktop | |
parent | d2796282721dd2ed4d2c67e4e8982fb32263b55d (diff) |
report the crash id back to the user
Change-Id: I5cc1e698294a5674d691529af8cc14e4cd87a711
Reviewed-on: https://gerrit.libreoffice.org/25865
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/minidump/minidump.cxx | 7 | ||||
-rw-r--r-- | desktop/source/minidump/minidump_upload.cxx | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/desktop/source/minidump/minidump.cxx b/desktop/source/minidump/minidump.cxx index c0d68c298fda..0075ca9d2b1f 100644 --- a/desktop/source/minidump/minidump.cxx +++ b/desktop/source/minidump/minidump.cxx @@ -82,7 +82,7 @@ std::string generate_json(const std::map<std::string, std::string>& parameters) return stream.str(); } -bool uploadContent(std::map<std::string, std::string>& parameters) +bool uploadContent(std::map<std::string, std::string>& parameters, std::string& response) { CURL* curl = curl_easy_init(); if (!curl) @@ -175,6 +175,7 @@ bool uploadContent(std::map<std::string, std::string>& parameters) std::cerr << response_body << " " << error_description << std::endl; + response = response_body; if( CURLE_OK != cc ) return false; @@ -182,7 +183,7 @@ bool uploadContent(std::map<std::string, std::string>& parameters) return true; } -bool readConfig(const std::string& iniPath) +bool readConfig(const std::string& iniPath, std::string& response) { std::ifstream file(iniPath); std::map<std::string, std::string> parameters = readStrings(file); @@ -200,7 +201,7 @@ bool readConfig(const std::string& iniPath) return false; } - return uploadContent(parameters); + return uploadContent(parameters, response); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/source/minidump/minidump_upload.cxx b/desktop/source/minidump/minidump_upload.cxx index 6a581db6a5a6..934f1add7268 100644 --- a/desktop/source/minidump/minidump_upload.cxx +++ b/desktop/source/minidump/minidump_upload.cxx @@ -20,9 +20,11 @@ int main(int argc, char** argv) } std::string iniPath(argv[1]); - if (!readConfig(iniPath)) + std::string response; + if (!readConfig(iniPath, response)) return EXIT_FAILURE; + std::cout << "Response: " << response << std::endl; return EXIT_SUCCESS; } |