diff options
-rw-r--r-- | drivers/atmodem/network-registration.c | 17 | ||||
-rw-r--r-- | plugins/hso.c | 21 |
2 files changed, 19 insertions, 19 deletions
diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c index af9ef4cb..c7dcc75d 100644 --- a/drivers/atmodem/network-registration.c +++ b/drivers/atmodem/network-registration.c @@ -909,24 +909,7 @@ static void at_creg_set_cb(gboolean ok, GAtResult *result, gpointer user_data) NULL, NULL, NULL); g_at_chat_send(nd->chat, "AT_OSQI?", none_prefix, NULL, NULL, NULL); - - /* - * Option has the concept of Speech Service versus - * Data Service. Problem is that in Data Service mode - * the card will reject all voice calls. This is a - * problem for Multi-SIM cards where one of the SIM - * cards is used in a mobile phone and thus incoming - * calls would be not signalled on the phone. - * - * 0 = Speech Service enabled - * 1 = Data Service only mode - */ - g_at_chat_send(nd->chat, "AT_ODO?", none_prefix, - NULL, NULL, NULL); - g_at_chat_send(nd->chat, "AT_ODO=0", none_prefix, - NULL, NULL, NULL); break; - case OFONO_VENDOR_MBM: g_at_chat_send(nd->chat, "AT*ERINFO=1", none_prefix, NULL, NULL, NULL); diff --git a/plugins/hso.c b/plugins/hso.c index 152e20cc..3c587e31 100644 --- a/plugins/hso.c +++ b/plugins/hso.c @@ -90,11 +90,28 @@ static void hso_debug(const char *str, void *user_data) static void cfun_enable(gboolean ok, GAtResult *result, gpointer user_data) { struct ofono_modem *modem = user_data; + struct hso_data *data = ofono_modem_get_data(modem); DBG(""); - if (ok) - ofono_modem_set_powered(modem, TRUE); + ofono_modem_set_powered(modem, ok); + + if (!ok) + return; + + /* + * Option has the concept of Speech Service versus + * Data Service. Problem is that in Data Service mode + * the card will reject all voice calls. This is a + * problem for Multi-SIM cards where one of the SIM + * cards is used in a mobile phone and thus incoming + * calls would be not signalled on the phone. + * + * 0 = Speech Service enabled + * 1 = Data Service only mode + */ + g_at_chat_send(data->app, "AT_ODO?", none_prefix, NULL, NULL, NULL); + g_at_chat_send(data->app, "AT_ODO=0", none_prefix, NULL, NULL, NULL); } static GAtChat *create_port(const char *device) |