1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-24 19:42:27 +03:00

Fix build with -DHTTPCLIENT_1_1_COMPATIBLE=0 (#6597)

We need to disable HTTPUPDATE_1_2 support when HTTPCLIENT_1_1
compatibility is not desired to avoid using methods that are
disabled.
This commit is contained in:
Dirk Mueller
2019-10-08 01:57:18 +02:00
committed by Earle F. Philhower, III
parent fabd169abc
commit 8b16d9c1d1
2 changed files with 10 additions and 8 deletions

View File

@ -43,7 +43,7 @@ ESP8266HTTPUpdate::~ESP8266HTTPUpdate(void)
{
}
#ifdef HTTPUPDATE_1_2_COMPATIBLE
#if HTTPUPDATE_1_2_COMPATIBLE
HTTPUpdateResult ESP8266HTTPUpdate::update(const String& url, const String& currentVersion,
const String& httpsFingerprint, bool reboot)
{
@ -94,7 +94,7 @@ HTTPUpdateResult ESP8266HTTPUpdate::update(WiFiClient& client, const String& url
return handleUpdate(http, currentVersion, false);
}
#ifdef HTTPUPDATE_1_2_COMPATIBLE
#if HTTPUPDATE_1_2_COMPATIBLE
HTTPUpdateResult ESP8266HTTPUpdate::updateSpiffs(const String& url, const String& currentVersion, const String& httpsFingerprint)
{
HTTPClient http;
@ -133,7 +133,7 @@ HTTPUpdateResult ESP8266HTTPUpdate::updateSpiffs(WiFiClient& client, const Strin
return handleUpdate(http, currentVersion, true);
}
#ifdef HTTPUPDATE_1_2_COMPATIBLE
#if HTTPUPDATE_1_2_COMPATIBLE
HTTPUpdateResult ESP8266HTTPUpdate::update(const String& host, uint16_t port, const String& uri, const String& currentVersion,
bool https, const String& httpsFingerprint, bool reboot)
{