summaryrefslogtreecommitdiffstats
path: root/src/sms.c
diff options
context:
space:
mode:
authorAndrzej Zaborowski <andrew.zaborowski@intel.com>2010-11-10 04:27:51 +0100
committerDenis Kenzior <denkenz@gmail.com>2010-11-10 09:09:55 -0600
commit45b944d84b55e76eeb410cd9a09e3ce2578a8382 (patch)
treeac02841a90225b64a00be70f4358391a326cc91e /src/sms.c
parent3083841f72579501b9dff187cbc856e3c437de57 (diff)
downloadofono-45b944d84b55e76eeb410cd9a09e3ce2578a8382.tar.bz2
sms: SMS-PP download must be enabled in sst / est
Diffstat (limited to 'src/sms.c')
-rw-r--r--src/sms.c13
1 files changed, 13 insertions, 0 deletions
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)