summaryrefslogtreecommitdiffstats
path: root/sms.c
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2012-11-04 13:27:58 +0100
committerPaul Kocialkowski <contact@paulk.fr>2012-11-04 13:27:58 +0100
commit2924bed3e740327f2c48c8d2508b1ba1e76a120a (patch)
tree3bd8e6e1e66ae6bb798528fe7988cc38dad90a11 /sms.c
parent62bda30666b8e47d3eae48b0d0431e65a33e36ab (diff)
downloadhardware_ril_samsung-ril-2924bed3e740327f2c48c8d2508b1ba1e76a120a.zip
hardware_ril_samsung-ril-2924bed3e740327f2c48c8d2508b1ba1e76a120a.tar.gz
hardware_ril_samsung-ril-2924bed3e740327f2c48c8d2508b1ba1e76a120a.tar.bz2
SMS: Process next incoming message after failure
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'sms.c')
-rw-r--r--sms.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/sms.c b/sms.c
index 39da237..43e3c28 100644
--- a/sms.c
+++ b/sms.c
@@ -609,6 +609,20 @@ list_continue:
* Notify RILJ about the incoming message
*/
+void ipc_sms_incoming_msg_next(void)
+{
+ struct ipc_sms_incoming_msg_info *incoming_msg;
+
+ ril_data.state.sms_incoming_msg_tpid = 0;
+
+ incoming_msg = ipc_sms_incoming_msg_info_find();
+ if(incoming_msg == NULL)
+ return;
+
+ ipc_sms_incoming_msg_complete(incoming_msg->pdu, incoming_msg->length, incoming_msg->type, incoming_msg->tpid);
+ ipc_sms_incoming_msg_unregister(incoming_msg);
+}
+
void ipc_sms_incoming_msg_complete(char *pdu, int length, unsigned char type, unsigned char tpid)
{
if(pdu == NULL || length <= 0)
@@ -668,7 +682,6 @@ void ipc_sms_incoming_msg(struct ipc_message_info *info)
*/
void ril_request_sms_acknowledge(RIL_Token t, void *data, size_t length)
{
- struct ipc_sms_incoming_msg_info *incoming_msg;
struct ipc_sms_deliver_report_request report_msg;
int success, fail_cause;
@@ -681,7 +694,7 @@ void ril_request_sms_acknowledge(RIL_Token t, void *data, size_t length)
if(ril_data.state.sms_incoming_msg_tpid == 0) {
LOGE("There is no SMS message to ACK!");
ril_request_complete(t, RIL_E_GENERIC_FAILURE, NULL, 0);
-
+ ipc_sms_incoming_msg_next();
return;
}
@@ -694,14 +707,7 @@ void ril_request_sms_acknowledge(RIL_Token t, void *data, size_t length)
ipc_fmt_send(IPC_SMS_DELIVER_REPORT, IPC_TYPE_EXEC, (void *) &report_msg, sizeof(report_msg), ril_request_get_id(t));
- ril_data.state.sms_incoming_msg_tpid = 0;
-
- incoming_msg = ipc_sms_incoming_msg_info_find();
- if(incoming_msg == NULL)
- return;
-
- ipc_sms_incoming_msg_complete(incoming_msg->pdu, incoming_msg->length, incoming_msg->type, incoming_msg->tpid);
- ipc_sms_incoming_msg_unregister(incoming_msg);
+ ipc_sms_incoming_msg_next();
}
/**