[go: up one dir, main page]

Skip to content

Commit

Permalink
compatibility esp32 >=3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dam74 committed Jul 28, 2024
1 parent bc8b756 commit 1b07095
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=ESPAsyncWebSrv
version=1.2.7
version=1.2.8
author=dvarrel
maintainer=dvarrel
sentence=Asynchronous HTTP and WebSocket Server Library for ESP8266 and ESP32 . Forked from https://github.com/me-no-dev/ESPAsyncWebServer
Expand Down
2 changes: 1 addition & 1 deletion src/AsyncEventSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ void AsyncEventSourceClient::_queueMessage(AsyncEventSourceMessage *dataMessage)
return;
}
if(_messageQueue.length() >= SSE_MAX_QUEUED_MESSAGES){
ets_printf("ERROR: Too many messages queued\n");
//ets_printf("ERROR: Too many messages queued\n");
delete dataMessage;
} else {
_messageQueue.add(dataMessage);
Expand Down
2 changes: 1 addition & 1 deletion src/AsyncWebSocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ void AsyncWebSocketClient::_queueMessage(AsyncWebSocketMessage *dataMessage){
return;
}
if(_messageQueue.length() >= WS_MAX_QUEUED_MESSAGES){
ets_printf("ERROR: Too many messages queued\n");
//ets_printf("ERROR: Too many messages queued\n");
delete dataMessage;
} else {
_messageQueue.add(dataMessage);
Expand Down
4 changes: 4 additions & 0 deletions src/AsyncWebSocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
#include <Arduino.h>
#ifdef ESP32
#include <AsyncTCP.h>
#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0)
// Code for version 3.x
#include "mbedtls/compat-2.x.h"
#endif
#define WS_MAX_QUEUED_MESSAGES 32
#else
#include <ESPAsyncTCP.h>
Expand Down
7 changes: 7 additions & 0 deletions src/WebAuthentication.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@

#include "Arduino.h"

#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0)
// Code for version 3.x
#ifdef ESP32

This comment has been minimized.

Copy link
@0xCAFEDECAF

0xCAFEDECAF Oct 21, 2024

Please move line 29 above line 27.

Currently line 27 causes compiler error on non-ESP32 platform (e.g. ESP8266).

#include "mbedtls/compat-2.x.h"
#endif
#endif

bool checkBasicAuthentication(const char * header, const char * username, const char * password);
String requestDigestAuthentication(const char * realm);
bool checkDigestAuthentication(const char * header, const char * method, const char * username, const char * password, const char * realm, bool passwordIsHash, const char * nonce, const char * opaque, const char * uri);
Expand Down

0 comments on commit 1b07095

Please sign in to comment.