Skip to content

Commit

Permalink
Fixed ESP32 SSL client warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
mobizt committed Aug 26, 2022
1 parent 6068008 commit a093ce2
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 24 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Firebase Arduino Client Library for ESP8266 and ESP32",
"version": "4.0.3",
"version": "4.0.4",
"keywords": "communication, REST, esp32, esp8266, arduino",
"description": "The library supports Firebase products e.g. Realtime database, Cloud Firestore database, Firebase Storage and Google Cloud Storage, Cloud Functions for Firebase and Cloud Messaging. The library also supported other Arduino devices using Clients interfaces e.g. WiFiClient, EthernetClient, and GSMClient.",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name=Firebase Arduino Client Library for ESP8266 and ESP32

version=4.0.3
version=4.0.4

author=Mobizt

Expand Down
4 changes: 2 additions & 2 deletions src/Firebase.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* The Firebase class, Firebase.cpp v1.1.2
* The Firebase class, Firebase.cpp v1.1.3
*
* Created July 10, 2022
* Created August 25, 2022
*
* The MIT License (MIT)
* Copyright (c) 2022 K. Suwatchai (Mobizt)
Expand Down
6 changes: 3 additions & 3 deletions src/Firebase.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

/**
* The Firebase class, Firebase.h v1.1.2
* The Firebase class, Firebase.h v1.1.3
*
* Created July 10, 2022
* Created August 25, 2022
*
* The MIT License (MIT)
* Copyright (c) 2022 K. Suwatchai (Mobizt)
Expand Down Expand Up @@ -1784,7 +1784,7 @@ class FIREBASE_CLASS
* the target String object's value will be empty.
*/
template <typename T1 = const char *, typename T2>
bool getString(FirebaseData &fbdo, T1 path, T2 target) { return RTDB.getString(&fbdo, path, &target); }
bool getString(FirebaseData &fbdo, T1 path, T2 target) { return RTDB.getString(&fbdo, path, target); }

/** Read the JSON string at the defined database path.
* The returned payload JSON string represents the child nodes and their value.
Expand Down
11 changes: 4 additions & 7 deletions src/Firebase_ESP_Client.h
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
#ifndef FIREBASE_CLIENT_VERSION
#define FIREBASE_CLIENT_VERSION "4.0.3"
#define FIREBASE_CLIENT_VERSION "4.0.4"
#endif

/**
* Google's Firebase ESP Client Main class, Firebase_ESP_Client.h v4.0.3
* Google's Firebase ESP Client Main class, Firebase_ESP_Client.h v4.0.4
*
* This library supports Espressif ESP8266 and ESP32 MCUs
*
* Created July 10, 2022
* Created August 26, 2022
*
* Updates:
* - Fixed ESP8266 Ethernet W5100 compilation error.
* - Add ESP8266 W5100 Ethernet options to prevent compilation error in PlatformIO.
* - Rename MillisTimer class to MB_MillisTimer to prevent compilation error in Teensy.
* - Add support SdFat SDIO interface.
* - Fixed ESP32 SSL client warning.
*
*
* This work is a part of Firebase ESP Client library
Expand Down
10 changes: 5 additions & 5 deletions src/wcs/base/FB_TCP_Client_Base.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ class FB_TCP_Client_Base
if (connected())
return true;

client->setTimeout(timeoutMs);

if (!client->connect(host.c_str(), port))
return setError(FIREBASE_ERROR_TCP_ERROR_CONNECTION_REFUSED);

client->setTimeout(timeoutMs);

return connected();
}

Expand Down Expand Up @@ -163,10 +163,10 @@ class FB_TCP_Client_Base
if (!connect())
return setError(FIREBASE_ERROR_TCP_ERROR_CONNECTION_REFUSED);

int res = client->write(data, len);
int res = client->write(data, len);

if (res != len)
return setError(FIREBASE_ERROR_TCP_ERROR_SEND_REQUEST_FAILED);
if (res != len)
return setError(FIREBASE_ERROR_TCP_ERROR_SEND_REQUEST_FAILED);

setError(FIREBASE_ERROR_HTTP_CODE_OK);

Expand Down
7 changes: 2 additions & 5 deletions src/wcs/esp32/FB_TCP_Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,6 @@ int FB_TCP_Client::hostByName(const char *name, IPAddress &ip)

void FB_TCP_Client::setTimeout(uint32_t timeoutmSec)
{
if (wcs)
wcs->setTimeout(timeoutmSec / 1000);

baseSetTimeout(timeoutmSec / 1000);
}

Expand All @@ -182,11 +179,11 @@ bool FB_TCP_Client::connect()
return true;
}

wcs->setTimeout(timeoutMs);

if (!wcs->_connect(host.c_str(), port, timeoutMs))
return setError(FIREBASE_ERROR_TCP_ERROR_CONNECTION_REFUSED);

wcs->setTimeout(timeoutMs);

return connected();
}

Expand Down

0 comments on commit a093ce2

Please sign in to comment.