diff options
author | Alexander Tarasikov <alexander.tarasikov@gmail.com> | 2012-07-06 16:01:35 +0400 |
---|---|---|
committer | Alexander Tarasikov <alexander.tarasikov@gmail.com> | 2012-07-06 16:01:35 +0400 |
commit | 92b6f145f3379bc2c5262e5f977856d06bbfa121 (patch) | |
tree | b7d459f76a4494266bd5fb54e1ca783e0a1a1d7d | |
parent | 9f3c5150ab0db61899bf5a8839b854c436e707bf (diff) | |
download | hardware_ril_samsung-ril-92b6f145f3379bc2c5262e5f977856d06bbfa121.zip hardware_ril_samsung-ril-92b6f145f3379bc2c5262e5f977856d06bbfa121.tar.gz hardware_ril_samsung-ril-92b6f145f3379bc2c5262e5f977856d06bbfa121.tar.bz2 |
Hack ussd for latin ascii to make it work at least
-rw-r--r-- | util.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -134,6 +134,9 @@ int ascii2gsm7(char *data, unsigned char **data_enc, int length) enc_length = ((length * 7) - (length * 7) % 8) / 8; enc_length += (length * 7) % 8 > 0 ? 1 : 0; + //FIXME: why does samsung does that? + enc_length++; + enc = malloc(enc_length); memset(enc, 0, enc_length); @@ -159,6 +162,10 @@ int ascii2gsm7(char *data, unsigned char **data_enc, int length) } *data_enc = enc; + + //FIXME: what is going on here? + enc[enc_length - 2] |= 0x30; + enc[enc_length - 1] = 0x02; return enc_length; } |