~aleteoryx/muditaos

6471bac90124bdabd64c27db4003eea24a0c2a27 — Adam Dobrowolski 4 years ago fd2051d
[EGD-8166] Private Number instead proper number shown on screen

Race condition workaround
1 files changed, 5 insertions(+), 2 deletions(-)

M module-apps/application-call/ApplicationCall.cpp
M module-apps/application-call/ApplicationCall.cpp => module-apps/application-call/ApplicationCall.cpp +5 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "ApplicationCall.hpp"


@@ 207,7 207,10 @@ namespace app

    void ApplicationCall::handleCallerId(const app::manager::actions::CallParams *params)
    {
        if (getCallState() != call::State::IDLE) {
        /// there is race condition in this code, we require `INCOMMING_CALL` state check due to it.
        /// alternatively we would require rewritting this application state handling
        if (getCallState() != call::State::IDLE && getCallState() != app::call::State::INCOMING_CALL) {
            LOG_ERROR("call id not handled");
            return;
        }
        if (callerIdTimer.isValid()) {