diff mbox series

[07/14] channel_curl: get_file: use log function

Message ID 20200914145712.4989-7-christian.storm@siemens.com
State Accepted
Headers show
Series [01/14] channel_curl: Make setting request_body symmetric | expand

Commit Message

Storm, Christian Sept. 14, 2020, 2:57 p.m. UTC
Make channel_get_file() use the factored out log function
like the other channel functions do.

Signed-off-by: Christian Storm <christian.storm@siemens.com>
---
 corelib/channel_curl.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/corelib/channel_curl.c b/corelib/channel_curl.c
index 27d4b62..e40bbff 100644
--- a/corelib/channel_curl.c
+++ b/corelib/channel_curl.c
@@ -1069,15 +1069,8 @@  channel_op_res_t channel_get_file(channel_t *this, void *data)
 	      total_bytes_downloaded, total_bytes_downloaded / 1024 / 1024);
 
 	result = channel_map_http_code(this, &channel_data->http_response_code);
-	if (result != CHANNEL_OK) {
-		ERROR("Channel operation returned HTTP error code %ld.",
-		      channel_data->http_response_code);
-		goto cleanup_file;
-	}
-	if (channel_data->debug) {
-		TRACE("Channel operation returned HTTP status code %ld.",
-			channel_data->http_response_code);
-	}
+
+	channel_log_reply(result, channel_data, NULL);
 
 	if (result_channel_callback_write_file != CHANNEL_OK) {
 		result = CHANNEL_EIO;