summaryrefslogtreecommitdiffstats
path: root/plugins/telit.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/telit.c')
-rw-r--r--plugins/telit.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/plugins/telit.c b/plugins/telit.c
index 4c6d12c4..b5b2dbe7 100644
--- a/plugins/telit.c
+++ b/plugins/telit.c
@@ -553,10 +553,23 @@ static void telit_pre_sim(struct ofono_modem *modem)
ofono_voicecall_create(modem, 0, "atmodem", data->chat);
}
+static void telit_post_sim(struct ofono_modem *modem)
+{
+ struct telit_data *data = ofono_modem_get_data(modem);
+
+ if (data->sap_modem)
+ modem = data->sap_modem;
+
+ DBG("%p", modem);
+
+ ofono_sms_create(modem, 0, "atmodem", data->chat);
+}
+
static struct bluetooth_sap_driver sap_driver = {
.name = "telit",
.enable = telit_sap_enable,
.pre_sim = telit_pre_sim,
+ .post_sim = telit_post_sim,
.disable = telit_sap_disable,
};
@@ -616,15 +629,6 @@ static void telit_set_online(struct ofono_modem *modem, ofono_bool_t online,
cbd, g_free);
}
-static void telit_post_sim(struct ofono_modem *modem)
-{
- struct telit_data *data = ofono_modem_get_data(modem);
-
- DBG("%p", modem);
-
- ofono_sms_create(modem, 0, "atmodem", data->chat);
-}
-
static void telit_post_online(struct ofono_modem *modem)
{
struct telit_data *data = ofono_modem_get_data(modem);