at: if we are using ofono, don't query modem manager for state

This commit is contained in:
Bhushan Shah
2021-03-11 12:13:04 +05:30
parent 060dc9ae32
commit 032bd4651c

View File

@@ -76,12 +76,16 @@ static gboolean send_at_command(struct EG25Manager *manager)
g_message("Sending command: %s", g_strstrip(command));
} else if (manager->modem_state < EG25_STATE_CONFIGURED) {
if (manager->modem_iface == MODEM_IFACE_MODEMMANAGER) {
MMModemState modem_state = mm_modem_get_state(manager->mm_modem);
if (manager->mm_modem && modem_state >= MM_MODEM_STATE_REGISTERED)
modem_update_state(manager, modem_state);
else
manager->modem_state = EG25_STATE_CONFIGURED;
} else {
manager->modem_state = EG25_STATE_CONFIGURED;
}
} else if (manager->modem_state == EG25_STATE_SUSPENDING) {
modem_suspend_post(manager);
} else if (manager->modem_state == EG25_STATE_RESETTING) {