diff options
author | Aki Niemi <aki.niemi@nokia.com> | 2010-12-03 10:50:34 +0200 |
---|---|---|
committer | Aki Niemi <aki.niemi@nokia.com> | 2010-12-22 17:13:48 +0200 |
commit | a044bc78802d0f855e0de1ebaaf3572125b2f857 (patch) | |
tree | b6af1717eb34d0e013336978cf96fa2551f4eb90 | |
parent | 46d52b5a9078b1a337f21f357aeb9a608c097f53 (diff) | |
download | ofono-a044bc78802d0f855e0de1ebaaf3572125b2f857.tar.bz2 |
isimodem: Fix sms driver routing resp handling
-rw-r--r-- | drivers/isimodem/sms.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/isimodem/sms.c b/drivers/isimodem/sms.c index 6c336e35..6b353ddb 100644 --- a/drivers/isimodem/sms.c +++ b/drivers/isimodem/sms.c @@ -143,7 +143,6 @@ static gboolean check_sim_status(const GIsiMessage *msg, uint8_t msgid, static gboolean check_sms_status(const GIsiMessage *msg, uint8_t msgid) { uint8_t cause; - uint8_t reason; if (g_isi_msg_error(msg) < 0) { DBG("Error: %s", strerror(-g_isi_msg_error(msg))); @@ -156,26 +155,25 @@ static gboolean check_sms_status(const GIsiMessage *msg, uint8_t msgid) return FALSE; } - if (!g_isi_msg_data_get_byte(msg, 0, &cause)) + if (!g_isi_msg_data_get_byte(msg, 0, &cause)) { + DBG("Unable to parse cause"); return FALSE; + } if (cause == SMS_OK) return TRUE; - if (!g_isi_msg_data_get_byte(msg, 1, &reason)) - return FALSE; - - if (reason == SMS_ERR_PP_RESERVED) { + if (cause == SMS_ERR_PP_RESERVED) { DBG("Request failed: 0x%02"PRIx8" (%s).\n\n Unable to " "bootstrap SMS routing.\n It appears some other " "component is already\n registered as the SMS " "routing endpoint.\n As a consequence, " "only sending SMSs is going to work.\n\n", - reason, sms_isi_cause_name(reason)); + cause, sms_isi_cause_name(cause)); return TRUE; } - DBG("Request failed: %s", sms_isi_cause_name(reason)); + DBG("Request failed: %s", sms_isi_cause_name(cause)); return FALSE; } |