View Single Post
  #1 (permalink)  
Old 02-18-2010, 09:24 AM
n3ur0's Avatar
n3ur0
Lurker
Offline
 
Join Date: Feb 2010
Posts: 1
Reputation: 5
n3ur0 is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
HTC Android - pin code - resolve problem

hello,,

bug is inside RIL - libhtcgeneric-ril-diamond.so

there is into source library:

*if* ( datalen == *sizeof*(*char**) ) *{*
asprintf(&cmd, "AT+CPIN=%s", strings[0]); <--------HERE IS PROBLEM
*}* *else* *if* ( datalen == 2**sizeof*(*char**) ) *{*
asprintf(&cmd, "AT+CPIN=%s,%s", strings[0], strings[1]); <---- AND HERE
*}* *else*
*goto* error;

must be:

if ( datalen == sizeof(char*) ) {
asprintf(&cmd, "AT+CPIN=\"%s\"", strings[0]);
} else if ( datalen == 2*sizeof(char*) ) {
asprintf(&cmd, "AT+CPIN=\"%s\",\"%s\"", strings[0], strings[1]);
} else
goto error;


if someona got source please recompile and try did work.
Reply With Quote
This post has been thanked 1 times.