We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7cfc61f commit db9a288Copy full SHA for db9a288
src/monitor.h
@@ -121,25 +121,22 @@ class BridgeMonitor: public Stream {
121
122
if (size == 0) return;
123
124
- k_mutex_lock(&monitor_mutex, K_FOREVER);
125
-
126
MsgPack::arr_t<uint8_t> message;
127
bool ret = bridge->call(MON_READ_METHOD, size).result(message);
128
129
if (ret) {
+ k_mutex_lock(&monitor_mutex, K_FOREVER);
130
for (size_t i = 0; i < message.size(); ++i) {
131
temp_buffer.store_char(static_cast<char>(message[i]));
132
}
+ k_mutex_unlock(&monitor_mutex);
133
134
135
// if (bridge.lastError.code > NO_ERR) {
136
// is_connected = false;
137
// }
138
139
- k_mutex_unlock(&monitor_mutex);
140
141
142
143
};
144
145
extern BridgeClass Bridge;
0 commit comments