From 96587520ed027012c491e3cdd78606b5ec6967b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=9F=E5=A4=A9=E8=BF=90?= Date: Tue, 29 Jan 2019 18:37:36 +0800 Subject: [PATCH] Update ota_fetch.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix bug that caused HTTP request to access HTTPS port due to macro definition SUPPORT_ITLS error 修复由于宏定义SUPPORT_ITLS错误使用,导致HTTP请求访问HTTPS端口的BUG --- src/services/ota/impl/ota_fetch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/ota/impl/ota_fetch.c b/src/services/ota/impl/ota_fetch.c index d28ee2cbe..cc9adeed0 100644 --- a/src/services/ota/impl/ota_fetch.c +++ b/src/services/ota/impl/ota_fetch.c @@ -60,7 +60,7 @@ int32_t ofc_Fetch(void *handle, char *buf, uint32_t buf_len, uint32_t timeout_s) h_odc->http_data.response_buf = buf; h_odc->http_data.response_buf_len = buf_len; diff = h_odc->http_data.response_content_len - h_odc->http_data.retrieve_len; -#if defined(SUPPORT_ITLS) +#if undefined(SUPPORT_ITLS) if (0 != httpclient_common(&h_odc->http, h_odc->url, 80, iotx_ca_get(), HTTPCLIENT_GET, timeout_s * 1000, &h_odc->http_data)) { #else