From d9cde38ca1a22ad2f6fa0d5ac97b2cfc14da8619 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 2 Oct 2021 19:08:11 +0200 Subject: [PATCH] helpers: simplify 364a86a34d2755ed6bad0a48909ee34eedc096e7 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/dd5610b497bf1a30a74989a69354c201c311c5e3 Author: vanhofen Date: 2021-10-02 (Sat, 02 Oct 2021) Origin message was: ------------------ - helpers: simplify 364a86a34d2755ed6bad0a48909ee34eedc096e7 ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/system/helpers.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/system/helpers.cpp b/src/system/helpers.cpp index 7b5323987..06b952c03 100644 --- a/src/system/helpers.cpp +++ b/src/system/helpers.cpp @@ -1908,7 +1908,7 @@ size_t CurlWriteToString(void *ptr, size_t size, size_t nmemb, void *data) bool getUrl(std::string& url, std::string& answer, std::string userAgent, unsigned int timeout) { - dprintf(DEBUG_NORMAL, "getUrl: url:%s\n", url.c_str()); + dprintf(DEBUG_NORMAL, "getUrl: url: %s\n", url.c_str()); CURL * curl_handle = curl_easy_init(); @@ -1938,8 +1938,7 @@ bool getUrl(std::string& url, std::string& answer, std::string userAgent, unsign if (httpres != 0 || answer.empty()) { - dprintf(DEBUG_NORMAL, "getUrl: error msg: %s\n", cerror); - dprintf(DEBUG_NORMAL, "getUrl: error url: %s\n", url.c_str()); + dprintf(DEBUG_NORMAL, "getUrl: error: %s (%s)\n", cerror, url.c_str()); return false; } @@ -1987,8 +1986,7 @@ bool downloadUrl(std::string url, std::string file, std::string userAgent, unsig if (httpres != 0) { - dprintf(DEBUG_NORMAL, "curl error msg: %s\n", cerror); - dprintf(DEBUG_NORMAL, "curl error url: %s\n", url.c_str()); + dprintf(DEBUG_NORMAL, "curl error: %s (%s)\n", cerror, url.c_str()); unlink(file.c_str()); return false; }