aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZiyan <jaraidaniel@gmail.com>2016-09-09 11:13:08 +0200
committerAndreas Blaesius <skate4life@gmx.de>2016-09-25 18:54:52 +0200
commit88c9ecb32840656b48a43dd6f81aa637b304c7bb (patch)
tree4260f2243ee9e34af732c39ec59b0897d9854bc7
parent9319d6e7ad32c24506128e74d6a422fa3b7b8817 (diff)
downloaddevice_samsung_espresso3g-88c9ecb32840656b48a43dd6f81aa637b304c7bb.zip
device_samsung_espresso3g-88c9ecb32840656b48a43dd6f81aa637b304c7bb.tar.gz
device_samsung_espresso3g-88c9ecb32840656b48a43dd6f81aa637b304c7bb.tar.bz2
libsecril-shim: fix RIL_REQUEST_LAST_CALL_FAIL_CAUSE
Remove extra element, crashing stuff on >=M. Change-Id: Id41750456cf5460a827700df44e8c89233fad383
-rw-r--r--rilsrc/libsecril-shim/secril-shim.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/rilsrc/libsecril-shim/secril-shim.c b/rilsrc/libsecril-shim/secril-shim.c
index 2c71709..4ddb21c 100644
--- a/rilsrc/libsecril-shim/secril-shim.c
+++ b/rilsrc/libsecril-shim/secril-shim.c
@@ -119,6 +119,13 @@ static void onRequestCompleteShim(RIL_Token t, RIL_Errno e, void *response, size
request = pRI->pCI->requestNumber;
switch (request) {
+ case RIL_REQUEST_LAST_CALL_FAIL_CAUSE:
+ /* Remove extra element (ignored on pre-M, now crashing the framework) */
+ if (responselen > sizeof(int)) {
+ rilEnv->OnRequestComplete(t, e, response, sizeof(int));
+ return;
+ }
+ break;
case RIL_REQUEST_QUERY_AVAILABLE_NETWORKS:
/* Remove the extra (unused) element from the operator info, freaking out the framework.
* Formerly, this is know as the mQANElements override. */