diff options
author | Robin Gareus <robin@gareus.org> | 2017-08-31 19:21:43 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-08-31 19:21:43 +0200 |
commit | 720292696a94c96d764e74b5e84fce09a1b3621c (patch) | |
tree | c2d87cbcb52c8260349cc5e4f9a0a9d554365b50 /gtk2_ardour/ardour_http.cc | |
parent | e10c162efb78392e686663aebe2f31a305586b15 (diff) |
Fix ArdourHTTP error reporting
Diffstat (limited to 'gtk2_ardour/ardour_http.cc')
-rw-r--r-- | gtk2_ardour/ardour_http.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gtk2_ardour/ardour_http.cc b/gtk2_ardour/ardour_http.cc index ba028d6f00..2b16ccc2c5 100644 --- a/gtk2_ardour/ardour_http.cc +++ b/gtk2_ardour/ardour_http.cc @@ -127,7 +127,7 @@ HttpGet::HttpGet (bool p, bool ssl) , _status (-1) , _result (-1) { - error_buffer[0] = '\0'; + memset (error_buffer, 0, sizeof (*error_buffer)); _curl = curl_easy_init (); curl_easy_setopt (_curl, CURLOPT_WRITEDATA, (void *)&mem); @@ -172,6 +172,7 @@ HttpGet::get (const char* url) free (mem.data); } // otherwise caller is expected to have free()d or re-used it. + memset (error_buffer, 0, sizeof (*error_buffer)); mem.data = NULL; mem.size = 0; @@ -180,11 +181,11 @@ HttpGet::get (const char* url) curl_easy_getinfo (_curl, CURLINFO_RESPONSE_CODE, &_status); if (_result) { - PBD::error << string_compose (_("HTTP request failed: (%1) %2"), _result, error_buffer); + PBD::error << string_compose (_("HTTP request failed: (%1) %2"), _result, error_buffer) << endmsg; return NULL; } if (_status != 200) { - PBD::error << string_compose (_("HTTP request status: %1"), _status); + PBD::error << string_compose (_("HTTP request status: %1"), _status) << endmsg; return NULL; } |