From 45b944d84b55e76eeb410cd9a09e3ce2578a8382 Mon Sep 17 00:00:00 2001 From: Andrzej Zaborowski Date: Wed, 10 Nov 2010 04:27:51 +0100 Subject: sms: SMS-PP download must be enabled in sst / est --- src/sms.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/sms.c') diff --git a/src/sms.c b/src/sms.c index eba45644..fe45ef34 100644 --- a/src/sms.c +++ b/src/sms.c @@ -37,6 +37,7 @@ #include "util.h" #include "smsutil.h" #include "storage.h" +#include "simutil.h" #define uninitialized_var(x) x = x @@ -1417,6 +1418,7 @@ void ofono_sms_deliver_notify(struct ofono_sms *sms, unsigned char *pdu, { struct ofono_modem *modem = __ofono_atom_get_modem(sms->atom); struct ofono_atom *stk_atom; + struct ofono_atom *sim_atom; struct sms s; enum sms_class cls; @@ -1485,6 +1487,17 @@ void ofono_sms_deliver_notify(struct ofono_sms *sms, unsigned char *pdu, if (cls != SMS_CLASS_2) break; + sim_atom = __ofono_modem_find_atom(modem, OFONO_ATOM_TYPE_SIM); + + if (!sim_atom) + return; + + if (!__ofono_sim_service_available( + __ofono_atom_get_data(sim_atom), + SIM_UST_SERVICE_DATA_DOWNLOAD_SMS_PP, + SIM_SST_SERVICE_DATA_DOWNLOAD_SMS_PP)) + return; + stk_atom = __ofono_modem_find_atom(modem, OFONO_ATOM_TYPE_STK); if (!stk_atom) -- cgit v1.2.3