Skip to content

Commit

Permalink
SIM PIN unlock fix
Browse files Browse the repository at this point in the history
Change-Id: I85bf85cdb87ddcb0b7437c4ff262197a3b50a35f
  • Loading branch information
nadlabak committed Jan 10, 2012
1 parent 6390582 commit 995c53e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libril/ril.cpp
Expand Up @@ -2097,7 +2097,7 @@ static int responseSimStatus(Parcel &p, void *response, size_t responselen) {
p.writeInt32(p_cur->ims_subscription_app_index);

sendSimStatusAppInfo(p, p_cur->num_applications, p_cur->applications);
} else if (responselen == sizeof (RIL_CardStatus_v5)) {
} else if (responselen % sizeof (RIL_CardStatus_v5 *) == 0) {
RIL_CardStatus_v5 *p_cur = ((RIL_CardStatus_v5 *) response);

p.writeInt32(p_cur->card_state);
Expand All @@ -2108,7 +2108,8 @@ static int responseSimStatus(Parcel &p, void *response, size_t responselen) {

sendSimStatusAppInfo(p, p_cur->num_applications, p_cur->applications);
} else {
LOGE("responseSimStatus: A RilCardStatus_v6 or _v5 expected\n");
LOGE("responseSimStatus: A RilCardStatus_v6 or _v5 expected; length %d is not multiple of %d\n",
(int)responselen, (int)sizeof (RIL_CardStatus_v5 *));
return RIL_ERRNO_INVALID_RESPONSE;
}

Expand Down

0 comments on commit 995c53e

Please sign in to comment.