From 809507d071ec18d0eb8bbd3355a09b992248499f Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 5 Nov 2015 22:01:12 -0600 Subject: [PATCH] gril: Remove g_ril_unsol_parse_new_sms & related --- gril/grilunsol.c | 53 ------------------------------------------------ gril/grilunsol.h | 10 --------- 2 files changed, 63 deletions(-) diff --git a/gril/grilunsol.c b/gril/grilunsol.c index 4f0472f4..56e4d05c 100644 --- a/gril/grilunsol.c +++ b/gril/grilunsol.c @@ -341,59 +341,6 @@ error: return nitz; } -void g_ril_unsol_free_sms_data(struct unsol_sms_data *unsol) -{ - if (unsol != NULL) { - g_free(unsol->data); - g_free(unsol); - } -} - -struct unsol_sms_data *g_ril_unsol_parse_new_sms(GRil *gril, - const struct ril_msg *message) -{ - struct parcel rilp; - char *ril_pdu; - size_t ril_pdu_len; - struct unsol_sms_data *sms_data; - - sms_data = g_new0(struct unsol_sms_data, 1); - if (sms_data == NULL) { - ofono_error("%s out of memory", __func__); - goto error; - } - - g_ril_init_parcel(message, &rilp); - - ril_pdu = parcel_r_string(&rilp); - if (ril_pdu == NULL) { - ofono_error("%s Unable to parse notification", __func__); - goto error; - } - - ril_pdu_len = strlen(ril_pdu); - - sms_data->data = decode_hex(ril_pdu, ril_pdu_len, - &sms_data->length, -1); - if (sms_data->data == NULL) { - ofono_error("%s Unable to decode notification", __func__); - goto error_dec; - } - - g_ril_append_print_buf(gril, "{%s}", ril_pdu); - g_ril_print_unsol(gril, message); - - g_free(ril_pdu); - - return sms_data; - -error_dec: - g_free(ril_pdu); -error: - g_ril_unsol_free_sms_data(sms_data); - return NULL; -} - int g_ril_unsol_parse_radio_state_changed(GRil *gril, const struct ril_msg *message) { diff --git a/gril/grilunsol.h b/gril/grilunsol.h index 829b8579..50d73592 100644 --- a/gril/grilunsol.h +++ b/gril/grilunsol.h @@ -47,11 +47,6 @@ struct ril_data_call_list { GSList *calls; }; -struct unsol_sms_data { - long length; - unsigned char *data; -}; - struct unsol_supp_svc_notif { int notif_type; int code; @@ -67,11 +62,6 @@ struct ril_data_call_list *g_ril_unsol_parse_data_call_list(GRil *gril, char *g_ril_unsol_parse_nitz(GRil *gril, const struct ril_msg *message); -void g_ril_unsol_free_sms_data(struct unsol_sms_data *unsol); - -struct unsol_sms_data *g_ril_unsol_parse_new_sms(GRil *gril, - const struct ril_msg *message); - int g_ril_unsol_parse_radio_state_changed(GRil *gril, const struct ril_msg *message);