|
@@ -735,7 +735,6 @@ void GpioHandler::registerGpioUri()
|
|
|
|
|
|
|
|
esp_err_t GpioHandler::handleHttpRequest(httpd_req_t *req)
|
|
esp_err_t GpioHandler::handleHttpRequest(httpd_req_t *req)
|
|
|
{
|
|
{
|
|
|
- std::lock_guard<std::recursive_mutex> lock(_mapMutex);
|
|
|
|
|
ESP_LOGD(TAG, "handleHttpRequest");
|
|
ESP_LOGD(TAG, "handleHttpRequest");
|
|
|
|
|
|
|
|
char _query[200];
|
|
char _query[200];
|
|
@@ -772,6 +771,8 @@ esp_err_t GpioHandler::handleHttpRequest(httpd_req_t *req)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ std::lock_guard<std::recursive_mutex> lock(_mapMutex);
|
|
|
|
|
+
|
|
|
if (gpioMap == NULL) {
|
|
if (gpioMap == NULL) {
|
|
|
httpd_resp_sendstr(req, "GPIO handler not initialized");
|
|
httpd_resp_sendstr(req, "GPIO handler not initialized");
|
|
|
return ESP_OK;
|
|
return ESP_OK;
|