Skip to content

Commit

Permalink
Fixed multi_heap_free failed during setting the value of the characte…
Browse files Browse the repository at this point in the history
…ristic in BLE Library. (#2789)
  • Loading branch information
chcbaram authored and me-no-dev committed Jun 5, 2019
1 parent fd5a2f0 commit e57de64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/BLE/src/BLECharacteristic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,9 @@ void BLECharacteristic::setValue(uint8_t* data, size_t length) {
log_e("Size %d too large, must be no bigger than %d", length, ESP_GATT_MAX_ATTR_LEN);
return;
}
m_semaphoreSetValue.take();
m_value.setValue(data, length);
m_semaphoreSetValue.give();
log_v("<< setValue");
} // setValue

Expand Down
1 change: 1 addition & 0 deletions libraries/BLE/src/BLECharacteristic.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ class BLECharacteristic {
void setHandle(uint16_t handle);
FreeRTOS::Semaphore m_semaphoreCreateEvt = FreeRTOS::Semaphore("CreateEvt");
FreeRTOS::Semaphore m_semaphoreConfEvt = FreeRTOS::Semaphore("ConfEvt");
FreeRTOS::Semaphore m_semaphoreSetValue = FreeRTOS::Semaphore("SetValue");
}; // BLECharacteristic


Expand Down

0 comments on commit e57de64

Please sign in to comment.