summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-12-20 23:15:23 +0100
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-12-20 23:22:53 +0100
commit3935ea6f21e4f42024a025de2cc3fb6bc1816002 (patch)
treed26e22c11946501e7502ed80a9b1faa3d94d7222
parent8446556704177e2393e3b09501c4142c0cd2644b (diff)
downloadhardware_ril_samsung-ril-3935ea6f21e4f42024a025de2cc3fb6bc1816002.zip
hardware_ril_samsung-ril-3935ea6f21e4f42024a025de2cc3fb6bc1816002.tar.gz
hardware_ril_samsung-ril-3935ea6f21e4f42024a025de2cc3fb6bc1816002.tar.bz2
sms: Make RIL_REQUEST_SEND_SMS_EXPECT_MORE work
ril_request_send_sms() is used both for RIL_REQUEST_SEND_SMS_EXPECT_MORE and RIL_REQUEST_SEND_SMS, so it shouldn't always only assume RIL_REQUEST_SEND_SMS, same for ipc_sms_svc_center_addr(). This fixes sending multipart messages. Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
-rw-r--r--sms.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/sms.c b/sms.c
index 6f8a8f8..fffeab7 100644
--- a/sms.c
+++ b/sms.c
@@ -210,8 +210,8 @@ int ril_request_send_sms(void *data, size_t size, RIL_Token token)
if (rc < 0)
return RIL_REQUEST_UNHANDLED;
- request = ril_request_find_request_status(RIL_REQUEST_SEND_SMS, RIL_REQUEST_HANDLED);
- if (request != NULL)
+ request = ril_request_find_token(token);
+ if (request == NULL)
return RIL_REQUEST_UNHANDLED;
values = (char **) data;
@@ -244,11 +244,11 @@ int ril_request_send_sms(void *data, size_t size, RIL_Token token)
if (rc < 0)
goto error;
} else {
- ril_request_data_set_uniq(RIL_REQUEST_SEND_SMS, pdu, pdu_size);
+ ril_request_data_set_uniq(request->request, pdu, pdu_size);
rc = ipc_fmt_send(ipc_fmt_request_seq(token), IPC_SMS_SVC_CENTER_ADDR, IPC_TYPE_GET, NULL, 0);
if (rc < 0) {
- ril_request_data_free(RIL_REQUEST_SEND_SMS);
+ ril_request_data_free(request->request);
goto error;
}
}
@@ -574,6 +574,7 @@ complete:
int ipc_sms_svc_center_addr(struct ipc_message *message)
{
struct ipc_sms_svc_center_addr_header *header;
+ struct ril_request *request = NULL;
void *smsc = NULL;
size_t smsc_size = 0;
void *pdu = NULL;
@@ -590,11 +591,15 @@ int ipc_sms_svc_center_addr(struct ipc_message *message)
if (header->length == 0 || header->length > (message->size - sizeof(struct ipc_sms_svc_center_addr_header)))
goto error;
- pdu_size = ril_request_data_size_get(RIL_REQUEST_SEND_SMS);
+ request = ril_request_find_token(ipc_fmt_request_token(message->aseq));
+ if (request == NULL)
+ goto error;
+
+ pdu_size = ril_request_data_size_get(request->request);
if (pdu_size == 0)
goto error;
- pdu = ril_request_data_get(RIL_REQUEST_SEND_SMS);
+ pdu = ril_request_data_get(request->request);
if (pdu == NULL)
goto error;