~aleteoryx/muditaos

a69fb53012bf42b2b960629974f62ee1d514d744 — breichel 5 years ago cb593f4
[EGD-4470]Fix no send init message on ready (#1059)

Fix: no send init message on sim ready
1 files changed, 3 insertions(+), 2 deletions(-)

M module-services/service-cellular/ServiceCellular.cpp
M module-services/service-cellular/ServiceCellular.cpp => module-services/service-cellular/ServiceCellular.cpp +3 -2
@@ 1104,12 1104,13 @@ bool ServiceCellular::unlockSimPuk(std::string puk, std::string pin)
bool ServiceCellular::handleSimState(at::SimState state, const std::string message)
{

    std::optional<std::unique_ptr<CellularMessage>> response;
    std::shared_ptr<CellularMessage> response;
    switch (state) {
    case at::SimState::Ready:
        Store::GSM::get()->sim = Store::GSM::get()->selected;
        // SIM causes SIM INIT, only on ready
        response = std::make_unique<CellularNotificationMessage>(CellularNotificationMessage::Type::SIM);
        response = std::move(std::make_unique<CellularNotificationMessage>(CellularNotificationMessage::Type::SIM));
        sys::Bus::SendMulticast(response, sys::BusChannels::ServiceCellularNotifications, this);
        sendSimUnlocked();
        break;
    case at::SimState::NotReady: