ret = alarm_schedule_noti_after_delay(notification_handle, delay, period, &alarm_id);
}
} else {
- if (alarm.find("period")->second.is<double>()) {
+ const auto it_period = alarm.find("period");
+ if (alarm.end() != it_period && it_period->second.is<double>()) {
LogAndReportError(PlatformResult(ErrorCode::INVALID_VALUES_ERR,
"AlarmAbsolute constructed by deprecated constructor."),
&out);
const auto& address = common::FromJson<std::string>(args, kAddress);
if (mac_address_.empty()) {
- mac_address_ == address;
+ mac_address_ = address;
}
bt_gatt_client_h client = service_.GetGattClientHandle(address);
const auto& address = common::FromJson<std::string>(args, kAddress);
if (mac_address_.empty()) {
- mac_address_ == address;
+ mac_address_ = address;
}
bt_gatt_client_h client = service_.GetGattClientHandle(address);
const auto& address = common::FromJson<std::string>(args, kAddress);
if (mac_address_.empty()) {
- mac_address_ == address;
+ mac_address_ = address;
}
bt_gatt_client_h client = service_.GetGattClientHandle(address);
void addRecordedData(picojson::value* data) {
ScopeLogger();
+ std::lock_guard<std::mutex> lock(mutex_);
recorded_data_->push_back(*data);
}
}
}
+ std::lock_guard<std::mutex> lock(handle_mutex_);
int ret = mc_server_update_metadata(handle_);
if (MEDIA_CONTROLLER_ERROR_NONE != ret) {
return LogAndCreateResult(
return ret;
}
// The variable used to determine if double mutex-locking is needed.
- auto to_process_cached = to_process_;
+ unsigned short to_process_cached = 0;
{
// All props should be fetched synchronously, but sync function does not work
std::lock_guard<std::mutex> lock_to_process(sim_to_process_mutex_);
+ to_process_cached = to_process_;
// would be deleted on } ending bracket
int result = tel_get_sim_cphs_netname(handle, SimCphsValueCallback, this);
if (TAPI_API_SUCCESS == result) {