Skip to content

Commit

Permalink
Fix null pointer exception when connected() was called when basic cli…
Browse files Browse the repository at this point in the history
…ent was not yet initialized.
  • Loading branch information
mobizt committed Aug 5, 2023
1 parent 1951e59 commit 69386c7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ESP_SSLClient",
"version": "2.0.4",
"version": "2.0.5",
"keywords": "communication, REST, esp32, esp8266, arduino",
"description": "This library provided the Secure Layer Networking (SSL/TLS) TCP Client for ESP8266, ESP32 and Raspberry Pi RP2040, Teensy, SAMD, AVR and other Arduino devices that support external networking 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=ESP_SSLClient

version=2.0.4
version=2.0.5

author=Mobizt

Expand Down
4 changes: 2 additions & 2 deletions src/ESP_SSLClient.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
*
* The ESP SSL Client Class, ESP_SSLClient.h v2.0.4
* The ESP SSL Client Class, ESP_SSLClient.h v2.0.5
*
* Created August 4, 2023
* Created August 5, 2023
*
* The MIT License (MIT)
* Copyright (c) 2023 K. Suwatchai (Mobizt)
Expand Down
7 changes: 5 additions & 2 deletions src/client/BSSL_SSL_Client.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* BSSL_SSL_Client library v1.0.2 for Arduino devices.
* BSSL_SSL_Client library v1.0.3 for Arduino devices.
*
* Created August 4, 2003
* Created August 5, 2003
*
* This work contains codes based on WiFiClientSecure from Earle F. Philhower and SSLClient from OSU OPEnS Lab.
*
Expand Down Expand Up @@ -140,6 +140,9 @@ int BSSL_SSL_Client::connect(const char *host, uint16_t port)

uint8_t BSSL_SSL_Client::connected()
{
if (!_basic_client)
return 0;

if (!_secure)
return _basic_client->connected();

Expand Down
4 changes: 2 additions & 2 deletions src/client/BSSL_SSL_Client.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* BSSL_SSL_Client library v1.0.2 for Arduino devices.
* BSSL_SSL_Client library v1.0.3 for Arduino devices.
*
* Created August 4, 2003
* Created August 5, 2003
*
* This work contains codes based on WiFiClientSecure from Earle F. Philhower and SSLClient from OSU OPEnS Lab.
*
Expand Down

0 comments on commit 69386c7

Please sign in to comment.