Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

compatibility with ESPAsyncWebServer #11

Closed
baddwarf opened this issue Feb 11, 2021 · 4 comments
Closed

compatibility with ESPAsyncWebServer #11

baddwarf opened this issue Feb 11, 2021 · 4 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@baddwarf
Copy link

Hi,

Please forgive me if it's an easy question. I'm a casual programmer.

I'm trying to use your library and ESPAsyncWebServer library https://github.com/me-no-dev/ESPAsyncWebServer. I've got a compilation error regarding _lock value (which is defined in both project).

I'm trying to understand what this variable is used for in your library but I can't find out. Is there a way to rename/bypass this and getting the two library working together?

@khoih-prog
Copy link
Owner

You can try the simple solution as follows to see if it's working for you

#include <AsyncHTTPRequest_Generic.h>        // https://github.com/khoih-prog/AsyncHTTPRequest_Generic
AsyncHTTPRequest request;

...

#undef _lock                                 // to undefine _lock in AsyncHTTPRequest_Generic.h to avoid conflict

#include <ESPAsyncWebServer.h>

If not, you can temporarily modify either ESPAsyncWebServer.h or AsyncHTTPRequest_Generic.h and change from _lock to _localLock or whatever unique.

In the future release of AsyncHTTPRequest_Generic, I'll try to use namespace to avoid name-pollution issue.

@khoih-prog
Copy link
Owner

I'll release a new version today to fix that conflict. Hold on if you still have some issue.

@baddwarf
Copy link
Author

Many thanks. I'll check that ASAP.

khoih-prog added a commit that referenced this issue Feb 11, 2021
### Releases v1.1.2

1. Rename _lock and _unlock to avoid conflict with [**ESP32/ESP8266 AsyncWebServer**](https://github.com/me-no-dev/ESPAsyncWebServer) library. Check [**compatibility with ESPAsyncWebServer #11**](#11)
2. Fix compiler warnings.
khoih-prog added a commit that referenced this issue Feb 11, 2021
### Releases v1.1.2

1. Rename _lock and _unlock to avoid conflict with [**ESP32/ESP8266 AsyncWebServer**](https://github.com/me-no-dev/ESPAsyncWebServer) library. Check [**compatibility with ESPAsyncWebServer #11**](#11)
2. Fix compiler warnings.
khoih-prog added a commit that referenced this issue Feb 11, 2021
### Releases v1.1.2

1. Rename _lock and _unlock to avoid conflict with [**ESP32/ESP8266 AsyncWebServer**](https://github.com/me-no-dev/ESPAsyncWebServer) library. Check [**compatibility with ESPAsyncWebServer #11**](#11)
2. Fix compiler warnings.
khoih-prog added a commit that referenced this issue Feb 11, 2021
### Releases v1.1.2

1. Rename _lock and _unlock to avoid conflict with [**ESP32/ESP8266 AsyncWebServer**](https://github.com/me-no-dev/ESPAsyncWebServer) library. Check [**compatibility with ESPAsyncWebServer #11**](#11)
2. Fix compiler warnings.
khoih-prog added a commit that referenced this issue Feb 11, 2021
### Releases v1.1.2

1. Rename _lock and _unlock to avoid conflict with [**ESP32/ESP8266 AsyncWebServer**](https://github.com/me-no-dev/ESPAsyncWebServer) library. Check [**compatibility with ESPAsyncWebServer #11**](#11)
khoih-prog added a commit that referenced this issue Feb 11, 2021
### Releases v1.1.2

1. Rename _lock and _unlock to avoid conflict with [**ESP32/ESP8266 AsyncWebServer**](https://github.com/me-no-dev/ESPAsyncWebServer) library. Check [**compatibility with ESPAsyncWebServer #11**](#11)
@khoih-prog
Copy link
Owner

Hi @baddwarf

The new release has been published. You contribution has been noted in Contributions and Thanks. Don't be humble anymore, we, Library Writers, need many fresh eyes and minds to test, use and point out many of our mistakes and omissions.

Please test and report if there is any further issue.



Releases v1.1.2

  1. Rename _lock and _unlock to avoid conflict with ESP32/ESP8266 AsyncWebServer library. Check compatibility with ESPAsyncWebServer #11
  2. Fix compiler warnings.

@khoih-prog khoih-prog added bug Something isn't working enhancement New feature or request labels Feb 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants