From 0ec3a1f6f59f0055f51223fa9f513c2ce289d0d8 Mon Sep 17 00:00:00 2001 From: Wolfgang Wiedmeyer Date: Sat, 3 Jun 2017 14:33:38 +0200 Subject: little fixes --- ss.c | 5 ++++- utils.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ss.c b/ss.c index 45fc48d..9a527d6 100644 --- a/ss.c +++ b/ss.c @@ -42,7 +42,10 @@ int ipc_ss_ussd_callback(struct ipc_message *message) goto error; } - ril_request_complete(ipc_fmt_request_token(message->aseq), RIL_E_SUCCESS, NULL, 0); + rc = ril_request_complete(ipc_fmt_request_token(message->aseq), RIL_E_SUCCESS, NULL, 0); + if (rc < 0) + goto error; + global_ussd_state = 0; goto complete; diff --git a/utils.c b/utils.c index 80b95e7..214f46f 100644 --- a/utils.c +++ b/utils.c @@ -111,7 +111,7 @@ int ascii2gsm7_ussd(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? + // FIXME: why does Samsung do this? enc_length++; enc = malloc(enc_length); @@ -140,7 +140,7 @@ int ascii2gsm7_ussd(char *data, unsigned char **data_enc, int length) *data_enc = enc; - //FIXME: what is going on here? + // FIXME: what is going on here? enc[enc_length - 2] |= 0x30; enc[enc_length - 1] = 0x02; -- cgit v1.1