mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-08 12:37:01 +03:00
Merge branch 'Over_The_Air_Update' of github.com:sle118/squeezelite-esp32 into Over_The_Air_Update
This commit is contained in:
@@ -524,21 +524,26 @@ char* wifi_manager_get_sta_ip_string(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool wifi_manager_lock_json_buffer(TickType_t xTicksToWait){
|
bool wifi_manager_lock_json_buffer(TickType_t xTicksToWait){
|
||||||
|
ESP_LOGD(TAG,"Locking json buffer");
|
||||||
if(wifi_manager_json_mutex){
|
if(wifi_manager_json_mutex){
|
||||||
if( xSemaphoreTake( wifi_manager_json_mutex, xTicksToWait ) == pdTRUE ) {
|
if( xSemaphoreTake( wifi_manager_json_mutex, xTicksToWait ) == pdTRUE ) {
|
||||||
|
ESP_LOGD(TAG,"Json buffer locked!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
ESP_LOGD(TAG,"Semaphore take failed. Unable to lock json buffer mutex");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
ESP_LOGD(TAG,"Unable to lock json buffer mutex");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wifi_manager_unlock_json_buffer(){
|
void wifi_manager_unlock_json_buffer(){
|
||||||
|
ESP_LOGD(TAG,"Unlocking json buffer!");
|
||||||
xSemaphoreGive( wifi_manager_json_mutex );
|
xSemaphoreGive( wifi_manager_json_mutex );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user