Showing
1 changed file
with
13 additions
and
0 deletions
| ... | ... | @@ -260,6 +260,9 @@ META_RESULT SmartPhoneSN::WriteNvramLoop() |
| 260 | 260 | char a_imei_ary2[16]; |
| 261 | 261 | char tmpBuf1[20] = {0}; |
| 262 | 262 | char tmpBuf2[20] = {0}; |
| 263 | + META_RESULT calc_imei1 = META_SUCCESS; | |
| 264 | + META_RESULT calc_imei2 = META_SUCCESS; | |
| 265 | + unsigned short checksum_v; | |
| 263 | 266 | // CString IMEI1_validity; |
| 264 | 267 | // CString IMEI2_validity; |
| 265 | 268 | |
| ... | ... | @@ -289,6 +292,16 @@ META_RESULT SmartPhoneSN::WriteNvramLoop() |
| 289 | 292 | } |
| 290 | 293 | a_imei_ary[15] = 0; |
| 291 | 294 | a_imei_ary2[15] = 0; |
| 295 | + calc_imei1 = META_NVRAM_Calculate_IMEI_CD(a_imei_ary, &checksum_v); | |
| 296 | + calc_imei2 = META_NVRAM_Calculate_IMEI_CD(a_imei_ary2, &checksum_v); | |
| 297 | + if (calc_imei1 == META_INVALID_ARGUMENTS) | |
| 298 | + { | |
| 299 | + UpdateUIMsg("IMEI1 checksum FAIL!!!"); | |
| 300 | + } | |
| 301 | + if (calc_imei2 == META_INVALID_ARGUMENTS) | |
| 302 | + { | |
| 303 | + UpdateUIMsg("IMEI2 checksum FAIL!!!"); | |
| 304 | + } | |
| 292 | 305 | |
| 293 | 306 | if(iRet1 == META_SUCCESS && iRet2 == META_SUCCESS) |
| 294 | 307 | { | ... | ... |
Please
register
or
login
to post a comment