diff options
author | Meng Wang <mewan@google.com> | 2016-06-08 22:15:11 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2016-06-08 22:15:12 +0000 |
commit | 6d445bb4a127bd9d59fc14d643353e30f4cf38fd (patch) | |
tree | 82650f5efee9b1ca38ffa3cb896c2db2b72b1ecc | |
parent | 075aa9bacab9451994048dbeef9a8620f920ac29 (diff) | |
parent | 5d703cbef4eccf6cb3cd15d31bf46c4951956fe3 (diff) | |
download | platform_hardware_ril-6d445bb4a127bd9d59fc14d643353e30f4cf38fd.tar.gz platform_hardware_ril-6d445bb4a127bd9d59fc14d643353e30f4cf38fd.tar.bz2 platform_hardware_ril-6d445bb4a127bd9d59fc14d643353e30f4cf38fd.zip |
Merge "Fix dispatchCarrierRestrictions string reading from parcel" into nyc-mr1-dev
-rwxr-xr-x | libril/ril.cpp | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/libril/ril.cpp b/libril/ril.cpp index 7a469c18..294fd4f6 100755 --- a/libril/ril.cpp +++ b/libril/ril.cpp @@ -2181,34 +2181,39 @@ static void dispatchCarrierRestrictions(Parcel &p, RequestInfo *pRI) { cr.len_excluded_carriers = t; cr.excluded_carriers = excluded_carriers; + startRequest; + appendPrintBuf("%s len_allowed_carriers:%d, len_excluded_carriers:%d,", + printBuf, cr.len_allowed_carriers, cr.len_excluded_carriers); + + appendPrintBuf("%s allowed_carriers:", printBuf); for (int32_t i = 0; i < cr.len_allowed_carriers; i++) { RIL_Carrier *p_cr = allowed_carriers + i; - p_cr->mcc = p.readCString(); - p_cr->mnc = p.readCString(); + p_cr->mcc = strdupReadString(p); + p_cr->mnc = strdupReadString(p); status = p.readInt32(&t); p_cr->match_type = static_cast<RIL_CarrierMatchType>(t); if (status != NO_ERROR) { goto invalid; } - p_cr->match_data = p.readCString(); + p_cr->match_data = strdupReadString(p); + appendPrintBuf("%s [%d mcc:%s, mnc:%s, match_type:%d, match_data:%s],", + printBuf, i, p_cr->mcc, p_cr->mnc, p_cr->match_type, p_cr->match_data); } for (int32_t i = 0; i < cr.len_excluded_carriers; i++) { RIL_Carrier *p_cr = excluded_carriers + i; - p_cr->mcc = p.readCString(); - p_cr->mnc = p.readCString(); + p_cr->mcc = strdupReadString(p); + p_cr->mnc = strdupReadString(p); status = p.readInt32(&t); p_cr->match_type = static_cast<RIL_CarrierMatchType>(t); if (status != NO_ERROR) { goto invalid; } - p_cr->match_data = p.readCString(); + p_cr->match_data = strdupReadString(p); + appendPrintBuf("%s [%d mcc:%s, mnc:%s, match_type:%d, match_data:%s],", + printBuf, i, p_cr->mcc, p_cr->mnc, p_cr->match_type, p_cr->match_data); } - startRequest; - appendPrintBuf("%s [len_allowed_carriers:%d, len_excluded_carriers:%d]", - printBuf, cr.len_allowed_carriers, cr.len_excluded_carriers); - closeRequest; printRequest(pRI->token, pRI->pCI->requestNumber); |